$a\cos\theta+b\sin \theta=m$
$(a\cos\theta+b\sin \theta)^2=m^2$
$a^2\cos^2\theta+b^2\sin^2\theta+2ab\sin \theta\cos\theta=m^2$-----(1)
$a\sin\theta+b\cos \theta=n$
$(a\sin\theta+b\cos \theta)^2=n^2$
$a^2\sin^2\theta+b^2\cos^2\theta-2ab\sin \theta\cos\theta=n^2$-----(2)
After adding (1) & (2)
$a^2\cos^2\theta+b^2\sin^2\theta+a^2\sin^2\theta+b^2\cos^2\theta=m^2+n^2$
$a^2(\cos^2\theta+\sin^2\theta)+b^2(\cos^2\theta+\sin^2\theta)=m^2+n^2$
$\sin^2\theta+\cos^2\theta=1$
$a^2+b^2=m^2+n^2$
Hence proved.