You have a bucket of water.

I want to put 10cm/3 of air 10 cm under the waterline.

First way: I push it down from the top with a weight. Eks a tube vertical and 10 cm into the water. Then push 10cm/3 down there through the tube with a weight or pump of some kind.

Second way: I drill a hole in the bucket 10 cm under the waterline and put a tube in there. And then press 10cm/3 of air in.

Can anyone help me prove that these two things take the same amount of energy? Any help would be much appriciated.

Thanks