Motion of two bodies one resting on the other
When a body A of mass m is resting on a body B of mass M then two conditions are possible:

1) A force F is applied to the upper body, and then following four situations are possible:
i) When there is no friction:
(a) The body A will move on body B with acceleration (F/m): \({{a}_{A}}=\frac{F}{m}\).
(b) The body B will remain at rest: aB = 0
(c) If L is the length of B as shown in figure, A will fall from B after time t:
\(t=\sqrt{\frac{2L}{a}}=\sqrt{\frac{2mL}{F}}\,\,\,\left( as\,s=\frac{1}{2}a{{t}^{2}}\,\,and\,\,a=\frac{F}{m} \right)\).
ii) If friction is present between A and B only and applied force is less than limiting friction (F < Fl):
F = Applied force on the upper body; Fl = Limiting friction between A and B; Fk = Kinetic friction between A and B.
a) The body A will not slide on body B till F < Fl i.e.., F < μsmg
b) Combined system (m + M) will move together with common acceleration: \({{a}_{A}}={{a}_{B}}=\frac{F}{m+M}\).
iii) If friction is present between A and B only and applied force is greater than limiting friction (F > Fl):
In this condition the two bodies will move in the same direction but with different acceleration. Here force of kinetic friction μkmg will oppose the motion of A while cause the motion of B. F – Fk = maA ⇒ \({{a}_{A}}=\frac{\left( F-{{F}_{k}} \right)}{m}=\frac{\left( F-{{\mu }_{k}}mg \right)}{m}\).
iv) If there is friction between B and floor:
Where, F’l = μ’ (M + m)g = limiting friction between B and floor, Fk = Kinetic friction between A and B and B will move only if Fk > F’l and then Fk – F’l = Mas.

However, if b doesn’t move then static friction will work between body B and the floor. I.e.., friction force is equal to applied force not F’l.