If m2+n2=10p2+10p+1, where m and n are positive integers and p is a prime number, what is m+n in terms of p?

The answer is 4p+3 but I'm not sure how to get there.