All you did is essentially right, your only mistake is in the last step, as LDC3 already pointed out in the comments. However, I am encouraging you to use units all the way and when dealing with thermodynamics use Kelvin instead of Celsius.
\begin{align}
Q &= mc\Delta T\\
\end{align}
Now you can form the equations for each of the problem, while substituting $\Delta T$ with a temperature range, being $x$ the final temperature the whole system will end up on. Also note, that the iron will be cooled down, while the water will be heated. (I am using a different approach than you.
\begin{align}
Q_\mathrm{loss} &= m(\ce{Fe})\cdot{}c(\ce{Fe})\cdot{}[T(\ce{Fe})-x]\\
Q_\mathrm{gain} &= m(\ce{H2O})\cdot{}c(\ce{H2O})\cdot{}[x-T(\ce{H2O})]\\
\end{align}
The transferred heat has to equal $$Q_\mathrm{gain} = Q_\mathrm{loss}$$
With this you can solve for $x$.
\begin{align}
m(\ce{Fe})\cdot{}c(\ce{Fe})\cdot{}[T(\ce{Fe})-x] &= m(\ce{H2O})\cdot{}c(\ce{H2O})\cdot{}[x-T(\ce{H2O})]\\
%m(\ce{Fe})\cdot{}c(\ce{Fe})\cdot{}T(\ce{Fe})-m(\ce{Fe})\cdot{}c(\ce{Fe})\cdot{}x &= m(\ce{H2O})\cdot{}c(\ce{H2O})\cdot{}x-m(\ce{H2O})\cdot{}c(\ce{H2O})\cdot{}T(\ce{H2O})\\
% m(\ce{Fe})\cdot{}c(\ce{Fe})\cdot{}T(\ce{Fe}) +m(\ce{H2O})\cdot{}c(\ce{H2O})\cdot{}T(\ce{H2O})&= m(\ce{H2O})\cdot{}c(\ce{H2O})\cdot{}x+m(\ce{Fe})\cdot{}c(\ce{Fe})\cdot{}x\\
% m(\ce{Fe})\cdot{}c(\ce{Fe})\cdot{}T(\ce{Fe}) +m(\ce{H2O})\cdot{}c(\ce{H2O})\cdot{}T(\ce{H2O})&= [m(\ce{H2O})\cdot{}c(\ce{H2O})+m(\ce{Fe})\cdot{}c(\ce{Fe})]\cdot{}x\\
x &=\frac{m(\ce{Fe})\cdot{}c(\ce{Fe})\cdot{}T(\ce{Fe}) +m(\ce{H2O})\cdot{}c(\ce{H2O})\cdot{}T(\ce{H2O})}{ m(\ce{H2O})\cdot{}c(\ce{H2O})+m(\ce{Fe})\cdot{}c(\ce{Fe})}\\
%
x &=\frac{30~\mathrm{g}\cdot{}0.449~\mathrm{\frac{J}{gK}}\cdot{}417~\mathrm{K} +40~\mathrm{g}\cdot{}4.184~\mathrm{\frac{J}{gK}}\cdot{}293~\mathrm{K}}{ 40~\mathrm{g}\cdot{}4.184~\mathrm{\frac{J}{gK}}+30~\mathrm{g}\cdot{}0.449~\mathrm{\frac{J}{gK}}}\\
x &= \frac{5616.99~\mathrm{J}+49036.48~\mathrm{J}}{167.36~\mathrm{\frac{J}{K}}+13.47~\mathrm{\frac{J}{K}}}\\
x &= \frac{54653.47}{180.83}~\mathrm{K} =302.24~\mathrm{K}\\
x &\approx 29~\mathrm{^\circ{}C}
\end{align}