By way of contradiction, assume \(m^2+n^2=p^2\) where \(\exists m,n,p \in \mathbb{Z}\). Since \(m\) and \(n\) are both odd \(m\) can be written a \(m=2k+1\) and \(n\) can be written as \(n=2j+1\). Therefore, \[\begin{align} m^2+n^2=(2k+1)^2+(2j+1)^2 \\=(4k^2+4k+1)+(4j^2+4j+1) \\=2(2k^2+2k)+1+2(2j^2+2j)+1 \\=2(2k^2+2k)+2(2j^2+2j)+2 \end{align}\].
Since \(2(2k^2+2k)\) and \(2(2j^2+2j)\) must be even, \(p^2\) must be even and therefore \(p\) must also be even (previously proved). This means \(p\) can be written as \(p=2\ell\). Thus, \(m^2+n^2=p^2\) can be written as \[\begin{align}2(2k^2+2k)+2(2j^2+2j)+2=4\ell^2 \\ (2k^2+2k)+(2j^2+2j)+1=2\ell^2 \end{align}\]
Since \((2k^2+2k)+(2j^2+2j)+1\) is odd, and \(2\ell^2\) is even this is a contradiction, so \(m^2+n^2\) cannot be a perfect square if \(m\) and \(n\) are odd.