From left to right, two lines always change places. First the line on positions 1 and 3, then on 2 and 4 and then on 3 and 5. Then again the lines on positions 1 and 3.

In the second row, first the lines on positions 3 and 5 are swapped and then on positions 1 and 3.

In the third row, the lines on positions 1 and 3 are first swapped, then on 2 and 4. To find the answer, the lines on positions 2 and 4 must therefore be swapped.