The forces acting on two masses are shown below.
Here, N is normal to the incline and tension T along the string up the incline. As the string and the pulley are all light and smooth, the tension in the string is uniform everywhere.

For equilibrium condition, forces should add to zero.
Thus, equating, m2g=m1gsinθ
⇒sinθ=m1m2=53 and cosθ=54
Normal force on m1 is N=m1gcosθ=5gcosθ
=5×10×54=40N
