Steps:
Suppose x kilograms are poured out, then
Inverted x x
Left 60 x 40 x
So x/(40-x) = (60-x)/x.
The solution is x=24.