The volume of a cone with height h and a circular base of radius r is 1/3 pi r^2 h. The volume of a cylinder with height h and a circular base of radius r is pi r^2 h. In the problem the height of the cone, namely 4, is 2/3 the height of the cylinder, namely 6. So, the volume of the cone is 1/3 pi r^2 2/3 h and the volume of the cylinder is pi r^2 h, where h=6 and r=4. That is, the volume of the cone is 2/9-th of the volume of the cylinder.
When the tank is turned upside down, 2/9-th of the volume previously in the cylinder has moved into the cone. That means, the oil now reaches to a level 7/9-th of the 6 cm side of the cylinder and completely fills the cone at the bottom. So, at its deepest (in the middle) the depth of the oil is (7/9 + 2/3)*6 = (7/9 + 6/9)*6 = (13/9)*6.