Blocks stacked on an incline connected by rope around pulley 

Two objects A and B, of masses 5 kg and 20 kg respectively, are connected by a massless string passing over a frictionless pulley at the top of an inclined plane, as shown in the figure. The coefficient of static friction is mu_s = 0.4 between all surfaces (a) To what angle $\theta$ must the plane be inclined for sliding to commence? (b) What is the tension in the rope, and what are the magnitudes of the friction forces at this critical inclination? (c) At an incline angle of 15$^\circ$, what is the tension in the rope? (d) At an incline angle of 35$^\circ$, what is the tension in the rope?

I was able to solve (a) and (b) by drawing a free body diagram as shown:

Newton's Second Law, setting all accelerations to zero, implies the following relationships:
$N_A  = m_A g \cos(\theta)$
$T = m_A g \sin(\theta) + f_2$
$N_B = (m_B + m_A) g \cos(\theta)$
$T + f_1 + f_2 = m_B g \sin(\theta)$
The second equation can be substituted into the fourth equation to give
\begin{equation}
    f_1 + 2f_2 = (m_B - m_A) g \sin(\theta) \;\;\;\; (1)
    \label{eq:1}
\end{equation}
Setting the friction forces to their maximum values $f_{1,{\rm max}} = \mu_s N_B = \mu_s (m_B + m_A) g \cos(\theta)$ and $f_{2,{\rm max}} = \mu_s N_A = \mu_s m_A g \cos(\theta)$ allows these equations to be solved for $\theta = 43^\circ$, $f_2 = 14.33$ N, $f_1 = 71.64$ N and $T = 47.76$ N.
I am however a bit confused about parts (c) and (d) dealing with angles below 43$^\circ$.
I have 5 unknowns: tension, two normal forces and two friction forces, but only four constraints from Newton's Second Law.
Equivalently, referring to Eq. (1), the net applied force which the static friction must oppose is fixed, so $f_1+2f_2$ is known, but there is no additional constraint to determine how much $f_1$ opposes and how much $f_2$ opposes.
There seems to be a degree of freedom in how $f_1$ and $f_2$ are determined, i.e. a free parameter.
My attempt so far at this is to suppose that for very small inclines we might expect friction to hold the blocks stationary and thus the rope would be slack and the tension $T$ is eliminated from the equations.
In this case the free body diagram would be drawn differently, because without the rope, the tendency is for block A to slide downwards across block B:

The maximum incline under these conditions is found by balancing forces:
$m_A g \sin(\theta) = f_2 \le \mu_s m_A g \cos(\theta)$
$\Rightarrow \tan(\theta) \le \mu = 0.4$
$\Rightarrow \theta \le 21.8^\circ$
When the incline is increased above $21.8^\circ$, I am confused about what will happen.
The blocks would slide down the slope, but the rope will tighten, and suddenly the tendency for the system would be for the heavier block B to accelerate down the slope, and the lighter block A to accelerate up the slope (because block B pulls on it via the rope), resulting in a free body diagram as in my original figure.
I still do not understand how to calculate tension and the two friction forces in this case.
How do I determine the tension $T$ and friction forces $f_1$ and $f_2$ for incline angles between $21.8^\circ$ and $43^\circ$?
For these inclines, there does not seem to be enough constraints to determine every quantity, see for example Eq. (1).
Is there an additional constraint I haven't thought of, or have I perhaps drawn my free body diagram incorrectly?
 A: Hint : Friction opposes tendency to move. Tension is produced if the string is stretched $very$ slightly. So, increase friction to maximum and then tension will act if necessary.
Ironically, you are thinking absolutely right. Give yourself a cookie.
From part $a$, we know that the blocks will be at rest at all angles below that.
You are also right as at very small angles there is no need of tension and we can ignore it to solve for, again, an angle condition. You have done excellent work. Congrats.
Now we come to the middle angles. Oh... they drive you insane, don't they?
Let's start. We can start our analysis from 2 blocks, 1 will give a contradiction and other will give a result, but I will start with the one giving contradiction. This will help you.
All angles are in degrees :
$\theta=35 $ 
Lets start by analysing Block A (No racism intended)
Gravity is trying to pull it down : $5*10*\sin(35)N=28.67N$
Friction comes to the rescue(up) : $50*\cos(35)N=16.38N$ // read my hint to know why friction is put max here
As it is at rest, $T=12.29N$
Now Block B is also at rest,
Weight = $114.71N$
max f= $81.92N$ 
$16.38+114.71=12.29+f$
$f=118.8N$
OOPS, it exceed max value. So, Lets start by analysing Block B. (I love alliteration)
Gravity trying : $114.71N$
Friction comes to the rescue(up) : $81.92N$ 
You can take from here I guess. calculate tension. Note that you have to revise your calculation for tension again as reaction friction force will be provided by A. Better assume it $f$ from starting FBD of B. 
This will yield the correct answer. Friction will be less than max value for upper block. In most cases, You should start analysing with heavier block(my experience). Hope your doubts are cleared.
A: Correction, the fourth equation should be $T+f_1+f_2=m_BgSin\theta$
Tension will be produced in the string if the blocks are stretched from the other side. When $\theta \leq 21.8^\circ$, you calculated that the frictional force on $A$ will be more than the force due to the incline. So yes, $A$ will accelerate upwards, slacking the string, so no Tension will be produced. But, if $B$ goes does, it will stretch the string again. You will have to see the relative acceleration of $A$ and $B$ to check if the string will slack. 
A: At low angles when friction can hold the blocks together, then there is no tension on the cable and thus:
$$ f_2 = m_A g \sin \theta \\ f_2 = (m_A+m_B) g \sin \theta $$
Only when there is motion on the blocks there is tension. In that case you have $\ddot{x} = \ddot{x}_A = -\ddot{x}_B$
$$ f_2 = \mu_S m_A g \cos \theta \\ f_2 = -\mu_S (m_A+m_B) g \cos \theta $$
(notice the sign change) and the equations of motion
$$ m_A (\ddot{x}) = g m_A \sin \theta -T -f_2 \\ m_B (-\ddot{x}) = g m_B \sin \theta -T - f_1 + f_2 $$
which is solved for $T$ and $\ddot{x}$.
The case where the two blocks are stuck together and sliding on the incline cannot exist because of the cable connecting them.
A: The answers posted by others encouraged me to examine the assumptions I was making in trying to solve the problem. Unfortunately I think none of the answers were ultimately heading in the right direction so I can't accept any of them.
I believe the answer is that the friction between block B and the plane will always be at its maximum value once the plane is inclined to 21.8$^\circ$ (i.e. to the point where the rope starts to tighten). This provides the extra constraint that allows the tension in the rope and the friction between the blocks to be determined. This has the consequence that tension gradually increases from zero at $\theta=21.8^\circ$ to its final value of $47.76$ N at $\theta=43^\circ$. There is also consequently a cross-over point where the friction between the blocks switches direction. To me this is a physically sensible result.
