Tension acting on the string as shown in figure indicates 25 kg load will be lifted up by this pully system.
Hence 25kg load will move upwards, while 15 kg load will move downwards.
Free body diagram of both the blocks showing the action of different forces are given in the figure.
Friction force against the wall for 25kg block = fW ;
friction force against the contacting surfaces between block that act on 25 kg block = fB , reaction force of fB that acts on 15 kg block = fB'
friction force against the contacting surfaces between block that act on 15 kg block = fA , reaction force of fA that acts on 25 kg block = fA'
we have, fW = fA = fA' = fB= fB' = μF , where μ is friction coefficient and F is applied force
for equilibrium of 15 kg block :- T+2μF = 15g .....................(1)
for equilibrium of 25 kg block :- 2T = 25g +3μF .....................(2)
solving for F using eqn.(1) and (2), we get F = (25/14)g = 17.5N