I don't doubt it was put in washer first, with the washer connections made, then the dryer connections were made, then the dryer was stacked on top of the washer and slid in. You should be able to reverse the process to remove the units and put the washer on wheels.
If the stack has moved forward such that the door no longer closes, there should be more space at the back than there was before. You should be able to tilt them back, hopefully without sliding the dryer further back off the washer top. You may need to string a moving strap around the whole stack sideways, to "stick" the stack together so the dryer doesn't move, and leaning the dryer back leans the whole stack.
Lean the stack back so you can stick shim strips of wood under the front of the washer so it rests on the strips. Then lean the stack forward so you can stick longer shim sticks toward the back. Then the stack will sit entirely on shim sticks. Repeat the lean-back-insert-strip-lean-forward-insert-strip procedure until you get the height necessary to get the rollers under.
Or take the dryer down, move it out of the way, then you can manipulate the washer easier to get the rollers under it.
There are videos available on the internet that a web-search will find, which may give you more ideas:
'how to get a washer dryer stack out of an alcove'