Step 6 - moving the edges to match the sides of the Rubik's Cube
Back view of the Rubik's Cube after this step
Turn the top layer until you have only one edge that matches the side. In this case, only red matches. Have the matching side face forward.
Do R U Ri U R U U Ri will move the back three edges anti-clockwise as shown. You may need to do this more than once to move the edges such that all sides match as shown above.
Special cases
Two adjacent edges are matching its side, but the two at the back of the Rubik's Cube are not.
Turn the top layer once, there should now be only one side matching. Now solve as described above.
Two opposite edges match its side, but the two edges on the left and right sides are not.
Do R U Ri U R U U Ri and you will have the case shown to the left. Follow the steps there.