The information gives you two equations:

and

Add the equations: , so

Substitute 27 for B in the first equation: , so