You know, using the same logic as the pillar from earlier, waking up at the bottom of the hole should have had the dot end up at the top of the wall, but I guess logic is inconsistent in this abstract world.
If you decide to make it consistent, since it wouldn't be as fun if it wasn't, then here:
Push the other dot into the hole, then jump in next to it. When both are at the bottom of the hole, wake up. Both are on top of the wall. Push the other dot along the top of the wall until the corner is reached. Push the other dot off the wall and jump after it. When both dots reach the bottom, they're both outside the cage/trap/thing.
Also, this reminds me of the flash game
Shift.