Why can we not just square the root and do 5^2+7^2?
You can, but that is the square of the result, not the result itself.