An absurdly complicated, simple force problem In my high school physics class, we're learning about analyzing force diagrams, with quite simple problems about blocks sliding down ramps. One of my friends decided to parody the hilarious "realism" these problems try to introduce with very unrealistic situations (e.g. "A cow is sliding down a ramp, pulled by a block"). He rattled off the following problem:

Two blocks on top of one another are sliding down a ramp with a slope that's getting smaller every second. Both are connected to pulleys, pulled by coffee cups in opposite directions. As a function of time, how much coffee do you need in the right cup to prevent the top block from moving with respect to the bottom block? 

I then translated this problem into the following diagram (the mass of the cup actually isn't relevant, just know the coffee+cup is $500$ grams):

$A$ and $B$ have equal mass of $1$ kg, and $\theta_0=\frac{\pi}{4}$. 
The first thing I attempted, as with all these types of problems, was to compute the net forces on each of the objects in question:
$$F_{net,A}(t)=\underbrace{g \sin(\theta_t)}_\text{gravity (horiz.)} + \underbrace{0.5g}_\text{pulley}-\underbrace{0.4\cdot 2g \cos(\theta_t)}_\text{surface friction}-\underbrace{0.1g \cos(\theta_t)}_\text{friction of A and B}$$
$$F_{net,B}(t)=\underbrace{g \sin(\theta_t)}_\text{gravity (horiz.)} - \underbrace{g\cdot M_C(t)}_\text{pulley}+\underbrace{0.1g \cos(\theta_t)}_\text{friction of A and B}$$
Where $\theta_t=\frac{\pi}{4}-0.1t$, and $M_C(t)$ is the mass of the right coffee at time $t$. Setting these equal and solving for $M_C(t)$ gives us:
$$M_C(t)=\frac{F_{net,A}(t)-g\sin(\theta_t)-0.1g\cos(\theta_t)}{-g}$$
Which simplifies to (this part took longer than I'd like to admit):
$$M_C(t)=\cos \left(\frac{\pi }{4}-0.1 t\right)-0.5$$
But this doesn't pass my sanity check, because this function is increasing from $0$ up to some weird multiple of $\pi$ - and I would almost certainly think the amount of coffee would strictly decrease, as surely making the force on $B$ up the ramp get bigger over time would pull $A$ and $B$ apart. My mistake may be as simple as not considering a force, but I also can't exactly justify why I set the net force on both equal - surely, they don't need to be equal, but just need to not overcome the static friction between the two. However, I'm not exactly sure how to express this mathematically.
What is the easiest way to approach this problem? 
 A: It is reasonable that both blocks need to have the same net force, otherwise they will experience different accelerations and begin to slip. The static friction puts an upper limit on the force from friction (use $\leq$ or $\geq$ as appropriate), so you should find a maximum and/or minimum mass of coffee that can be in the cup; your current calculation will get you the limiting value.
The calculation seems fine with my intuition - consider the initial time and the time when $\theta=0$, these might help guide your thinking. Keep in mind that the tilt will eventually go the other way, and ultimately upside down I guess, at which point your solution will probably lose validity (that is, you'd better consider the acceleration perpendicular to the plane!). 
A: The forces you identified are (kind of) correct, and the math is correct, and so it results in a (kind of) correct answer, although counter intuitive at first thought.
Let's first see why the answer is actually  quite correct. We first note that the values are such, that the block A starts sliding down the slope right from the start regardless of the mass of the coffee. So, we assume both blocks slide down the slope, because we want them to stick together. When the slope of the ramp decreases, what happens actually is that the friction slowing down the block A increases (because the friction has a cosine in its function). This means that we can pour more coffee into the second mug, as we can afford to decelerate also the block B more without them coming apart. Hence, the mass increases, as you found on your answer. (Also the friction between the two blocks contributes to the effect in the same manner.)
Now where there is room for improvement, is that the frictions you specified are maximum friction forces. Actually there is a range of values for the mass of the coffee that solve the problem at each time instant. With the calculations done as you have done them you assume that the blocks are at the limit of almost separating, but of course with less coffee (in the beginning at least) they stick together as well. Also defining the direction of the friction the surface causes to block A results in your answer not being valid after the blocks have stopped for the first time (although this might not be of interest).
