so we want to solve for h
if it is
m=h-(w/8) then go to AAAAAAAAA
but if it is
m=(h-w)/8 then go to BBBBBBBB
AAAAAAAAAAAAAAAA
m=h-(w/8)
add w/8 to both sides
m+(w/8)=h
BBBBBBBBBBB
m=(h-w)/8
mulieplty both sides by 8
8m=h-w
add w to both sides
8m+w=h
so h=8m+w or h=m+(w/8) depending on where the h is