How to Do Rubik’s Cube Trick in Spider-Man 2

I can't solve one in real life, so I'll let Peter do the hard work.

Spider man 2 screenshot of spider man solving a rubik's cube while falling in new york.