Please help me solve it. It’s a practice questions that is similar to the one that I will have on the upcoming exam and I need to understand how to solve it. Thank you!

7. (30 points) Let in Samuelson model agents maximazeIn(ci(t)) + In(c2(t + 1)) – maxC1 (t).ca(t+1)’earning product W(t) = 1 only when young and exchanging part of for money M(t)p(t) ci(t) = p(t) . 1 – M(t),p(t + 1) c2(t + 1) = M(t),with prices p(.). Initial Mo at t = 1 is given p(1) c2(1) = Mo and number of young N is constant.(a) (15 points) Calculate total demand for real money balances NM(t)/p(t) in the economy when t =1, 2, …, 00.(b) (15 points) Calculate total demand for real money balances NM(t)/p(t) in the economy with finitenumber of generations t = 1, 2, …, T.