I don't know why I find this so difficult, I feel very stupid right now. I should express the total length only in terms of ##y_{A}## and ##y_{B}##, right? I've been staring myself blind at this figure.
No. However, the rationale was that, since one weight moves down as the other moves up, and vice versa, the difference should always be a constant. Do you think this is wrong? If so, what's the relationship between ##y_{A}## and ##y_{B}##?
Edit: Now that I think about it, ##y_{A} + y_{B} = c##...