Intertemporal utility maximization through consumption I need help in solving this question from one of the entrance examination.

Q.Consider an economy where a representitive agent lives for three periods.
In the first period, she is young - this is the time when she gets
education. In the second period, she is middle-aged and with the level
of education acquired in the first period, she generates income. More
specifically, if she has $h$ units of education in the first period, she can
earn $wh$, in the second period, where $w$ is the exogenously given wage
rate.

The agent borrows funds for her education when she is young and
repays with interest when she is middle aged. If in the first period,
the agent borrows $e$, then the human capital $h$ at the beginning of the
second period becomes $h(e)$, where $$dh/de &gt; 0$$$$d^2h/de^2 &lt; 0$$

In the third period of her life, she consumes out of her savings made
in the second period, that is, when she was middle aged. Assume
that the exogenous rate of interest (gross) on saving or borrowing is
$R$. For simplicity, assume that an agent does not consume when she
is young and, thus, the life time utility is $u(c^m) + bu(c^o)$, where $c^m$ and $c^o$ are the level of consumption when they are middle-aged and
old respectively and $0&lt;b&lt;1$ is the discount factor.

1. Write down the utility maximization problem of the agent and the
first order conditions.

2.  How does the optimal level of education vary with the wage rate
and the rate of interest?

I cannot understand how to use the interest rate. Also I have got following answer to 1:-

maximizing$$U = u(c^m) + bu(c^o)$$ subjected to the constraint
$$c^o/(1+r) + c^m = wh(e) - (1+r)e$$
from which we can get Lagrange first order equations.

I cannot see how $R$ could be used. Also got a doubtful answer for 2.
Hint : You can write down your Lagrangian and simply take derivatives according to $c^{o}$ and $c^{m}$. So, you will mainly have two first order conditions with a lagrange multiplier. After, you will combine these two equation to eliminate your lagrange multiplier, which will give your intertemporal optimality condition (so-called Euler equation). I don't write the whole maximisation problem but only Euler condition.

$$bu^{'}\left(c^{o}\right)=\frac{u^{'}\left(c^{m}\right)}{1+r}$$

The role of interest rate is quite evident. If your interest rate increases, the marginal utiliy of consuming when old decreases, which means that it is optimal to consume more when old. Intuitively, it is plausible, if interest rate increases, the opportunity cost of consuming today increases.

For the second question, when you try to find optimal level of education, you should take the derivative according to $e$. So, the lagrange multiplier cancels out, which mean that you find a somewhat static problem. You will have ;

$$h^{'}(e)=\frac{1+r}{w}$$

If wage is higher, marginal utility of capital is less, which means that the level of education is higher. So, if wage is high, there are more incentives to invest on human capital. You can make the inverse similar interpretation for the interest rate.