.. m(p+4) = mp + 10p(p+4) ... second equation
.. 4m = 10p(p+4) ... subtract mp
.. 4(4p(p-5)) = 10p(p+4) ... combine results so far
.. 16(p-5) = 10(p+4) ... divide out p
.. 6p = 120 ... add 80-10p
.. p = 20
.. m = 4*20*15 = 1200
The man distributed $1200.