
Let's set this up by listing every horizontal force acting on block Q directly, rather than analysing block P first.
Four horizontal forces act on Q: the applied force F pulling it forward, friction from the ground resisting that motion, friction from block P sitting on top of it, and the pull of the string, which loops from P over the fixed wall pulley and back to Q, so it also drags Q toward the wall.
Ground friction first. The ground carries the full weight resting on it, which is the weight of Q plus the weight of P transmitted down through it: $100+200=300\ \text{kN}$. With a friction coefficient of 0.3 between Q and the surface, this gives $0.3 \times 300=90\ \text{kN}$ of resistance.
Now consider what block P costs Q. Block P cannot move, the inextensible string holds it fixed against the wall. As Q is dragged out from under it, kinetic friction develops between P and Q equal to $0.4 \times 100=40\ \text{kN}$ (using the normal force of 100 kN, P's own weight). This entire 40 kN must be supplied by the string tension holding P still, so the tension in the string is also 40 kN.
Because the string loops back to Q through the same pulley, that same 40 kN tension pulls Q backward too, on top of the 40 kN friction reaction Q already feels from P. So block P effectively costs Q $40+40=80\ \text{kN}$ of resistance, not just 40 kN.
Adding the ground's contribution: $F=90+80=170\ \text{kN}$.
Let's summarize:
So the minimum force needed to pull block Q is 170 kN.