The blocks A and B each have a mass m. What is the largest horizontal force which must be applied to B so that A will not slip up B if the coefficient of static friction between A and B is m. Neglect friction between B and C.

a. 2 m g (m cos q + sin q)/(cos q + m sin q)
b. 2 m g (m cos q + sin q)/(cos q - m sin q)
c. 2 m g (m cos q - sin q)/(cos q - m sin q)
d. 2 m g (m cos q - sin q)/(cos q + m sin q)

Consider the forces acting on the blocks.
The net vertical force acting on B is given by
f sin q = N cos q + 2 m g
but f = m N
=> N = 2 m g/(cos q - m sin q)    ------ (1)

The net horizontal force acting on B is
f cos q + N sin q = P
=> P = N (
m cos q + sin q)
Substituting the value of N from (1), we have
P = 2 m g (m cos q + sin q)/(cos q - m sin q)

The largest horizontal force that must be applied to B so that A will not slip up B is
P = 2 m g (m cos q + sin q)/(cos q - m sin q)