(write 4B instead of B4)

so i guess you are having trouble solving the simultaneous equations?

here's another approach

Let

Let

there you have your A and B

the method you were attempting was the equating coefficients method, i don't see the problem you have, the only thing left for you to do is to solve the simultaneous equations