In general, you cannot simply subtract electrode potentials like this to find the potential of another half-reaction. They have to be weighted by $n$ (the stoichiometric coefficient of $\ce{e-}$). In cases where your method works, it is only because $n$ is coincidentally the same for both half-reactions you are combining.
The foolproof way is always to convert electrode potentials to Gibbs free energy changes:
$$\Delta G^\circ = -nFE^\circ$$
So $\Delta G^\circ$ for the half-reaction $\ce{MnO4- + 8H+ + 5e- -> Mn^2+ + 4H2O}$ is
$$(-5)(96485 \text{ C mol}^{-1})(1.51 \text{ V}) = -728.4 \text{ kJ mol}^{-1}$$
and $\Delta G^\circ$ for the half-reaction $\ce{MnO4- + 4H+ + 3e- -> MnO2 + 2H2O}$ is
$$(-3)(96485 \text{ C mol}^{-1})(1.7 \text{ V}) = -492.1 \text{ kJ mol}^{-1}$$
Subtracting the second equation from the first, you will find that $\Delta G^\circ$ for the half-reaction of interest ($\ce{MnO2 + 4H+ + 2e- -> Mn2+ + 2H2O}$) is
$$(-728.4) - (-492.1) = -236.3 \text{ kJ mol}^{-1}$$
which gives:
$$E^\circ = -\frac{-236.3 \text{ kJ mol}^{-1}}{(2)(96485 \text{ C mol}^{-1})} = 1.22 \text{ V.}$$
I presume some rounding errors led to the slight discrepancy between my answer and the answer you want. You may leave out the Faraday constant in the calculations once you are more familiar with them; basically that means you work with the quantity $nE^\circ$ instead of $\Delta G^\circ$. The answer should be the same since they are directly proportional.
For more information you can refer to the redox chapters in any inorganic chemistry textbook (Shriver/Atkins, Housecroft, etc.). These calculations are dealt with under the sections discussing Latimer and Frost diagrams.