Step 5: Swap yellow edges in the top layer
In the previous step we created a yellow cross on the top of the Rubik's Cube but probably the yellow edges are not all fitting to the colors of the side center pieces. In this stage of the Rubik's Cube solution we have have to fix this by repositioning these cubelets.
The algorithm switches the front-top and the left-top edges as marked on the image:
R U R' U R U2 R' U
U2 marks a double face turn (180 degrees).
When you get to this stage the first thing you have to do is to rotate around the top layer trying to find two edges which have to be switched. Sometimes it can occur that you can't find two pieces to swap next to each other, because you would have to swap two which are facing each other. In this case you'll have to execute the permutation twice, as shown on the second animation.
Switch two edges in the last layer
Press the play button to see how to switch the orange-yellow and green-yellow edges.
Sometimes the algorithm has to be applied twice
Execute it twice to swap to pieces in the opposite sides of the cube. In this example the green and blue edges:
U (R U R' U R U2 R' U) y2 (R U R' U R U2 R' U)