Don't worry, I worked everything out, yay!
For anyone that was interested, instead of doing:
I just did:Code:child = 2*parent + width
which makes sense if you think about it long enough, and draw diagrams and stuffCode:child = parent + (parent - base) + width