(d) We know that the current in the circuit
$I = \frac{E}{R + r}$
and power delivered to the resistance R is
$P = I^{2}R = \frac{E^{2}R}{(R + r)^{2}}$
It is maximum when $\frac{dP}{dR} = 0$
$\frac{dP}{dR} = E^{2}\left\lbrack \frac{(r + R)^{2} - 2R(r + R)}{(r + R)^{4}} \right\rbrack = 0$
Or $(r + R)^{2} = 2R(r + R)$
Or $R = r$