This is a numerical-answer question. The correct answer is shown below.
[Solution by Dr. Abubacker] For a real image $m=-2$, so $v=2u$ in magnitude. Distance $u+v=3u=45\Rightarrow u=15$ cm and $v=30$ cm. $f=\frac{uv}{u+v}=\frac{15\times30}{45}=10$ cm. Answer: 10.