$${F = F_2-F_1 = \rho gh_2S-\rho gh_1S = \rho gS(h_2-h_1)}$$