Videos
Presumably the issue is that the outlet boxes protrude from the drywall.
Before doing anything else, turn off the power to the outlet.
Generally these boxes are typically nailed into the studs. If this is the case, simply pry the nails out, reseat the boxes deeper in, and re-nail them into place.
If you can't reseat the boxes deeper (e.g. if something impinges on the rear of the boxes), there's a few options. Replace the boxes with shallower ones. Use a dremel or similar to cut off the protruding parts of the box. Or add a "frame" around the box.
Like it has been said here a few times, remove the old box with a hacksaw or a sawzall. Then you can slide the box off and work the wires through the box clamps. If you can find this style of box it will be easier to use.
As you can see this can easily be screwed in to were the old box was and you will be able to get the box to the correct depth.
No, you can't.
An extension cord is designed for temporary use. Many of us (myself included) will use an extension cord on a "semi-permanent" basis.
But it is quite different to have an exposed extension cord and a hidden extension cord. An extension cord is not designed - or rated & tested - for use in a hidden location. Use in that matter raises the very real possibility of damage to the cord from repeated walking on the carpet going unnoticed until it is too late (e.g., fire). Wires are also rated based on temperature, and a cord that is rated for a particular temperature based on being in open air may not be safe when used under a carpet, where it may heat up quite a bit more - also increasing fire risk.
The proper way to use a floor outlet is to have a cutout in the carpet around the outlet, and ideally a cover on the outlet when it is not in use to avoid dirt (or even worse, spilled drinks) getting into the outlet. I see that type of outlet in hotels & conference rooms and it is a little ugly but functional and safe.
If you are not going to use the floor outlet at all, covering it with a movable rug is OK. But you should never cover an outlet or junction box of any type (e.g., including if you removed the outlet, capped the wires and put on a blank plate) with any permanent flooring like wall-to-wall carpet. All electrical connections (with very few exceptions) need to be easily accessible.
That's not how you use those outlets
Those outlets are for putting a desk above them, and now you have power to the desk. I gather you've changed the usage of that room and now it is open space that is traversed by people, or you have a rug that can't fit without overlapping that floor outlet. Well, then, you don't use the floor outlet.
It is illegal to use extension cords (cordage) as a substitute for the permanent wiring of a building. I once saw a hefty 6/2 cord going to a powdercoat oven, drywalled right into the wall. On my next visit a few months later, there was EMT conduit and a receptacle there instead. Fire marshal had been by, I guess.
Running extension cord under carpet is a bad idea for so many reasons, as manassehkatz discusses. They do make special under-carpet cable, you might try researching that, but how you terminate that cable at the floor box will still be a major safety issue.
What's at stake here is the fire inspector finding the bad installation In the ashes (it's what they do), and declining your fire insurance, leaving you on the hook for the mortgage when they call it. (Even a non-recourse loan becomes recourse at that point, and worse, it can't be cleared in bankruptcy, nor can civil liability for injuries). The penalty is rare but harsh. Speaking of rare but harsh, manslaughter charges are also possible.
The right thing is to install additional wall outlets, or other floor outlets, where you actually do need them... Or if appropriate, hang a pendant from the ceiling. -Although if your building is built to recent Code, it will already have wall outlets strategically placed so any appliance with a 6' (2m) cord that's along a wall can reach an outlet with its own cord.
I hardly need to tell you how to plug more than 2 things into a receptacle.