Contradictory results under different assumptions Consider the system depicted below. Masses $m_{1},m_{2}$ move down the inclined plane with constant velocity $v$. The friction force on mass $m_{1}$ is $f$ and on mass $m_{2}$ is $2f$. 
At a certain time, while $m_{1},m_{2}$ are still on the inclined plane, the string connecting masses 1 and 2 is cut. 
The question is what is the acceleration of masses $m_{2},M$ afterwards?

If we assume that the total force acting on $m_{2}$ points upwards then Newton's 2nd law applied to $m_{2}$ gives $T-2f-m_{2}g\sin\theta=m_{2}a$ and the same law applied to mass $M$ gives $T-Mg=-Ma$. Solving for $a$ we get
$$a=\frac{(M-m_{2}\sin\theta)g-2f}{m_{2}+M}$$
which is only positive (i.e. the acceleration is up) if $$M-m_{2}\sin\theta>\frac{2f}{g}$$.
If $$M-m_{2}\sin\theta<\frac{2f}{g}\tag{1}$$ we would expect the total force on $m_{2}$ to point downhill.
But let's assume that $m_{2}$ acceleration is downhill. Then Newton's 2nd law for $m_{2}$ gives $T+2f-m_{2}g\sin\theta=-m_{2}a$ and the same law for mass $M$ gives $T-Mg=Ma$. Solving for $a$, we get
$$a=\frac{(m_{2}g\sin\theta-M)g-2f}{m_{2}+M}$$ 
which is positive (i.e. the acceleration is pointing down) only when
$$M-m_{2}\sin\theta<-\frac{2f}{g}\tag{2}$$
Equations (1) and (2) seem to be contradictory. Shouldn't I get (1) if I assume that $m_{2}$ total force points downhill? Where is the mistake?
 A: It seems to me that you're entirely disregarding the first part of the question. It says that at the beginning, the two masses on the slope are moving downwards. This means that immediately after the string is cut the mass $m_2$ is still moving downwards. Friction always acts in the direction opposite to the motion of the body. Therefore there is only one equation of motion that you can write for this mass at that moment in time,
$$ T + 2f - mg \sin \theta = ma~.$$
The two outcomes you attempted to discuss above are the two possible directions of the acceleration $a$: up or down the slope. The way we set up the equation, the value of the acceleration $a$ will be positive if the acceleration is up the slope. Similarly, you can write for the mass $M$
$$Mg - T = Ma~.$$
Solving for $a$ between the two of the above equations you will get that $a$ is negative (down the slope) if 
$$m_2 \sin \theta > M + \frac{2f}{g}~,$$
which should be somehow intuitive: the mass $m_2$ has to be big enough to counteract both the influence of mass $M$ and the friction.
Having found the acceleration, you can then find the velocity. For $a<0$, the velocity will never change its direction and the mass $m_2$ will continue moving down the slope with bigger and bigger speed. For $a>0$, the mass will decelerate, stop, and then start moving upwards. You can find the point in time when the velocity becomes zero (i.e., the acceleration upwards has acted long enough for the $m_2$ to stop moving downward and then start moving upward). It's then that the friction starts acting downward instead of upward (i.e., against the direction of motion, as always), and you'll have to solve the equations of motion again to find the acceleration accounting for that. 
A: When the string between $m_1, m_2$ is cut, this removes a force pulling down the slope on $m_2$. If m2m2 initially had zero acceleration down the slope (constant velocity) it cannot now have +ve acceleration down the slope, because there is now less force pulling it down the slope, not more.
$m_2$ is initially moving down the incline so the friction force points up the incline, in the same direction as $T$, the tension in the remaining string.
Your derivation of the 1st equation is incorrect. If $a$ is +ve up the incline then the equation of motion for $m_2$ is $T+2f-m_2 g\sin\theta=m_2a$. You got the sign of $2f$ wrong.
In the 2nd derivation the sign of $2f$ is the same as $T$, which is correct.
