A = 7
B = 3
H = 2
Also, upon checking, your first equation is wrong. The area of your first equation is equivalent to 8, but it should be 10
So, let's find a correct answer.
A = 12
B = 8
H = 1