I'm actually working on the same problem...I don't know if you got it yet, but I've set it up pretty close to that, with one difference:
Instead of 2a + 6 - a = L (L being total length), I have
2a+6-x = L
(x being the distance between the top and the 'fork').
Does that make sense to you...