Look at the operations performed on h. They are (in order) ...
To solve for h, we undo these operations in the reverse order.
The desired equation is ...
... h = (g·j + j)/3