In the given question $F=2t$ where $t$ is time in seconds for which the force has been applied. Friction exists only between $A$ and $B$ with coefficient of friction $\mu=1/2$. Here we can easily see that the $f_{max}=\mu N$=$10N$ where $f_{max}$ stands for the maximum value of friction, hence therefore the acceleration that can be given to the block B would be $$\frac{f_{max}}{4} =2.5m/s^2,$$ hence both the blocks would move together till $$\frac{F}{m_A + m_B}=2.5$$=$$\frac{2t}{6}=2.5$$ hence the time comes out to be equal to 7.5 seconds and till $t=7.5 sec$ they move together.
But I am myself confused in proving the last line that till $t=7.5 sec$ they move together. For example lets consider time $t=1sec$. At the taken time $F=2N$.
Now when $F=2N$, the a friction of $2N$ would also act in the opposite direction on $A$ as $f_{max}=10N$. From Newton's third law an opposite reaction of frictional force would act on $B$ and $B$ would start moving ahead with an acceleration of $0.5m/s^2$ Hence now the block B has started motion but $A$ according to equations of dynamics is at rest which is actually not possible as till $7.5 sec$ the must move together. Please tell me where I am wrong?