Differentiation of household’s lifetime utility 
A household's lifetime utility is given by
  $$ V(\left\{ c_t , d_t\right\}^{\infty}_{t=0}) = \sum_{t=0}^{\infty} \beta^t \left( \log{c_t} + \gamma \log{d_t} \right) $$
  The marginal rate of subsitution between $d_t$ and $c_t$ is given by
  $$\text{MRS}_t^{c,d} = - \frac{ \partial V / \partial d_t}{ \partial V / \partial c_r} $$
  We have
  $$ \frac{\partial V}{\partial d_t} = \sum_{j=0}^{\infty} \gamma^{t+j} \frac{ \partial u (c_{t+j}, d_{t+j})}{\partial d_{t+j}} \frac{\partial d_{t+j}}{\partial d_t} = \sum_{j=0}^{\infty} \gamma^{t+j} \frac{\gamma}{d_{t+j}} (1-\delta)^j $$

This part should be fairly obvious
I fail to understand how do we differentiate V w.r.t. d_t
Main Question
Where did the j come from? And how should I proceed to get the result in 2? That is the only part of the question that I do not understand. I hope my question is clear.
 A: OK, first of all, because of the way $d_t$ is defined, i.e.
$$d_t = (1-\delta)d_{t-1} + x_t$$
The derivative $\frac{\partial d_{s}}{\partial d_t}$ is necessarily $0$ when $s<t$. Thus, when you take the derivative of $V$ w.r.t. $d_t$:
$$\frac{\partial V}{\partial d_t} = \sum_{s=0}^{\infty} \gamma^{s} \frac{ \partial u (c_{s}, d_{s})}{\partial d_{s}} \frac{\partial d_{s}}{\partial d_t}$$
all the terms with $s<t$ drop out and you in fact have
$$\frac{\partial V}{\partial d_t} = \sum_{s=t}^{\infty} \gamma^{s} \frac{ \partial u (c_{s}, d_{s})}{\partial d_{s}} \frac{\partial d_{s}}{\partial d_t}$$
Now, redefining $s=t+j$ you can rewrite the sum as
$$\frac{\partial V}{\partial d_t} = \sum_{j=0}^{\infty} \gamma^{t+j} \frac{ \partial u (c_{t+j}, d_{t+j})}{\partial d_{t+j}} \frac{\partial d_{t+j}}{\partial d_t}\; .$$
That should clear up the first question. Next, you should be able to convince yourself that 
$$\frac{\partial d_{t+j}}{\partial d_t} = (1-\delta)^j \; .$$
That's just a matter of working out the recurrence. Just start with simple examples $j=1,2,\ldots$
Finally, 
$$\frac{ \partial u (c_{t+j}, d_{t+j})}{\partial d_{t+j}} = \frac{ \partial \left( \log{c_{t+j}} + \gamma \log{d_{t+j}} \right)}{\partial d_{t+j}} = \gamma\frac{\partial  \log{d_{t+j}} }{\partial d_{t+j}} = \frac{\gamma}{d_{t+j}} \; .$$
The derivative of the logarithm is the multiplicative inverse.
