Unfortunately I don't know how to provide diagrams ( which would have helped greatly). So I need to explain as best I can.
The weight 40g, can be resolved into 2 components: 40g sin(30) down slope and 40g cos(30) perp to (and against) the slope.
The force P can be resolved into 2 comps: P cos(30) up slope and P sin(30) perp and against slope.
.: total normal reaction (perp to slope) = 40g cos(30) + P sin(30)
.: the friction = 0.2 x the normal reaction
The component of P up slope must be just enough (equal to) to overcome the component of the weight down the slope (40g sin(30) )
as well as the friction
You end up with:
(sqrt(3)/2 - 0.1) x P = 20g + 4sqrt(3)g
Hope you can follow my explanation.