Gas is less dense ( smaller density ) than oil which is more dense. Since density is directly proportional to mass and inversely proportional to volume, gas will occupy a larger space than oil.
The larger space occupied is the space above the mixture of oil and gas, hence gas is above oil
The kinetic energy of a book on a shelf is equal to the work done to lift the book to the shelf is false. The kinetic energy on the shelf is zero because it is not in action.