If I think straight, the initial potential energy in a column of liquid would be the integration of mgh (actually integration of density * g * section * height), therefore mgh/2 at the beginning of the situation. Or said intuitively : the center of gravity of the column at half its height.
But obviously, even with this 1/2, your relation after dividing between two tanks still holds. :)