There are three different liquids in the pipe, with density d1,d,d2

The level will be adjusted due to different in pressure in two sides of the pipe.

It will reach equilibrium when the pressure are equal at the buttom.