One of our first clues in factoring this expression is that the first and last terms are perfect squares:
sqrt(m^2) = m√m2=m
and
sqrt(25y^2) = 5y√25y2=5y
In the most general case, we are looking for a solution in the form of
(am+by)(cm+dy) = m^2-10my+25y^2(am+by)(cm+dy)=m2−10my+25y2
acm^2 + (bc+ad)my + bdy^2 = m^2-10my+25y^2acm2+(bc+ad)my+bdy2=m2−10my+25y2
From the first term we can see that a*c = 1a⋅c=1. Assuming aa and cc are integers, they must be both either +1+1 or -1−1. Let's make them +1+1 for now and continue (it actually doesn't matter which we choose at this point - can you see why?):
m^2 + (b+d)my + bdy^2 = m^2-10my+25y^2m2+(b+d)my+bdy2=m2−10my+25y2
From the last term we see that b*d = 25b⋅d=25. From the second term, we must also have (b+d) = -10(b+d)=−10. The obvious solution for this is to have b=d=-5b=d=−5. Therefore we have the solution
(m-5y)(m-5y) = m^2-10my+25y^2(m−5y)(m−5y)=m2−10my+25y2
Once we have worked through this type of problem, we could have probably started by guessing this solution from the first two observations.