Solve the equation for the bold variable (h)

This is the formula for the surface area of a cylinder including the ends, like the total surface area of a can of peas.
S = 2·π·r² + 2·π·r · H
Divide each side by 2·π·r :
S/2·π·r = r + H
Subtract r from each side :
H = (S/2·π·r) - r
or
H = (S - 2·π·r²) / (2·π·r)
In order to solve for the bold variable, we follow the order of operations. In this case h = S/(2(pi)r) - r
S = 2(pi)r^2 + 2(pi)rh ----> Subtract 2(pi)r^2 from both sides
S - 2(pi)r^2 = 2(pi)rh ----> Divide by 2(pi)r
S/(2(pi)r) - r = h