Analytical and numerical solution to the convection problem in a shallow cavity filled with two immiscible superposed fluids