Your initial question is to get a relation between A and B, right ?
If so, just look at their formulas. They both have in it.
So, for example, write that and substitute it in A.
If it's not what you're looking for, can you be more precise about what you want ? I can't see what you want to do with the stuff you've written down in the rest of your message