Is 40ml of oil denser than 25ml of vinegar? and are most chemical changes easy or difficult to undo?

Density equals weight Divided by volume, so the amount of ml (volume) makes no difference. Vinegar is denser than oil. That's why when you put the 2 together, the oil floats on top.

density does NOT equal mass divided by volume. it is mass divided by volume. and there is a big difference between mass and weight. and mL is not the unit that goes with volume it is cc.

what are some things that use density to work????

Most hydrocarbons have a density around 0.7-0.8 g/mL. The motor oils I could find listed were shown (used motor oil, for example) at 0.89 g/mL. Vinegar is mostly water with a little acetic acid (about 4-5%). Since water is 1 g/mL, vinegar should be close to 1 g/mL. I found a typical 5% vinegar listed at 1.01 g/mL. Whether you use 40 mL or 25 mL makes no difference in this comparison.
As for chemical changes easy or difficult to undo, it all depends upon how you define easy and difficult. It also depends upon what chemical change we are trying to undo. For example, I have a chemical change if I strike a match and let it burn. But to change it back to a match would be MOST difficult. However, I can put hydrogen gas and oxygen gas in a container, add a spark or a match and it explodes. If I do this in a vessel and collect the product, which is water, then I can reverse this chemical change by electrolyzing the water back to hydrogen and oxygen gas (which is another chemical change). And I can switch back and forth between the two. I hope this helps.