Using Distributive Property:
Combine and get all the terms in left sides and set it equal to zero and solve for m.
(m-5) (m-1) = -3 //Basic step of distribution.
m(m-1) -5(m-1) = -3
m^2 - m - 5m + 5 = -3 //Combine like terms and add 3 on both sides.
m^2 - 6m + 8 = 0 //Factor
m^2 - 4m - 2m + 8 = 0
m(m-4) -2(m -4) = 0
(m-4)(m-2) = 0 //Solve for m.
Got two equations:
1)m - 4 = 0
m = 4
2) m - 2 = 0
m = 2
Solution: m = 4, 2
//Hope this helps