Question concerning the right expression for friction Suppose we have 2 boxes, one whose mass is $M$ and other one with mass $m$, also $m < M$. We place $m$ on top of $M$. There is no friction between ground and the lower box touching the ground. However there is friction between the two masses. Now, when calculating the force $F$ necessary in order to keep $m$ and $M$ together (which has only an horizontal component, just to be clear), we should keep into account the friction between the boxes, meaning that $\text{Friction}=mg$. In this case, isn't $friction=(F-N)\mu$, where $N$ is the normal force between $m$ and $N$? Since $\text{Friction}=F_\perp \mu$, I would expect $F_\perp$ to be $F-N$, however my book ignores the $F$ in the last formula I wrote.
 A: The answer is different depending on whether F is applied to the upper block or to the lower block. The answer by @Bob D assumes F is applied to the upper block.  The answer by @Vishal Anand assumes F is applied to the lower block.
Use three force balances on: the entire system, the upper block alone, and the lower block alone, with the same acceleration for each block and for the center of mass since there is no slip between the blocks.  Let f denote the force of friction. For F applied to the upper block: $F - f = ma, f = Ma, F = (M + m)a$. For F applied to the lower block: $F - f = Ma, f = ma, F = (M + m)a$.  The maximum $f$ is $\mu_smg$.
I calculate the same result as @Vishal Anand for $F_{max}$ applied to the lower block.  I calculate the same answer as @Bob D for $F_{max}$ applied to the upper block.
This is good example of: the importance of using free body diagrams, recognizing the constraint that the acceleration is the same for both blocks with no slipping, and understanding that the force of static friction can vary from zero to its maximum value determined by the coefficient of static friction and the normal force. For those beginning to study dynamics, this is a good problem to learn from.
A: 

As far as I understood your doubt, this is the situation. You want to know the maximum force i.e. $F$ for which the blocks doesn't slip.
Here, 
$N_1$ = Normal force applied by the ground on the lower box 
$N_2$ = Normal force applied by the lower block on the upper block or you can say normal force applied by the upper block on the lower block (in downward direction)
Now, 
Maximum static friction that can be developed between the blocks:
$$(f_s)_{\text{max}} = \mu N_2$$
Since $N_2 = mg$
$$(f_s)_{\text{max}} = \mu mg$$
Maximum common acceleration possible:
$$(a_{\text{common}})_{\text{max}} = \frac{\mu mg}{m} = \mu g$$
Therefore maximum force possible for common acceleration (no slipping):
$$F_{\text{max}} = \mu g(m + M)$$
Thus, $F \le \mu g (m+M)$ for no slipping between the blocks. Here $F = \mu g(m+M)$ is the limiting case.

Hope this helps.
A: 
we should keep into account the friction between the boxes, meaning
that =. In this case, isn't
=(−), where  is the normal force between 
and ? Since =⊥, I would expect ⊥ to be −,
however my book ignores the  in the last formula I wrote

Friction does not equal $mg$. The normal force $N$ is $mg$. The maximum possible static friction force for the boxes to stay together is $f_{max}=\mu_{s}N$, where $\mu_{s}$ is the coefficient of static friction between the two boxes. And you second equation is also incorrect and I can't follow the rest.
When approaching problems like these it is best to begin with free body diagrams. The free body diagrams below show the two boxes where the external force $F$ is applied to the small box. The force $f_{f}$ is the static friction force that each box exerts on the other.
As long as static friction keeps the boxes together they will both experience the same acceleration, which, per Newton's second law is
$$a=\frac{F}{m+M}$$
So from Newton's second law the net force acting on the small box is
$$F_{m}=ma=\frac{mF}{m+M}$$
From the FBD on block $m$, the net force is
$$F_{m}=F-f_{f}$$
Therefore
$$F-f_{f}=\frac{mF}{m+M}$$
$$F=f_{f}\biggl(1+\frac{m}{M}\biggr)$$
The maximum possible static friction force for the blocks to stay together is
$$f_{f}=\mu_{s}mg$$
Making the maximum applied force $F$ where the blocks stay together
$$F_{max}=\mu_{s}mg\biggl(1+\frac{m}{M}\biggr)$$
In terms of the normal force $N$
$$F_{max}=\mu_{s}N\biggl(1+\frac{m}{M}\biggr)$$
Hope this helps.

