Instead of physically simulating every swap, this question can be answered directly by counting inversions, that is, pairs of digits that appear in the wrong relative order compared with the target sequence 1 2 3 4 5. Every single switch (adjacent swap) can remove at most one inversion, so the minimum number of steps equals the total number of inversions in the starting sequence.
The starting sequence is 5, 1, 4, 3, 2. Compare every pair of digits, in the order they appear, and mark a pair as an inversion if the left one is bigger than the right one:
Adding these up: $4 + 0 + 2 + 1 = 7$.
Let's summarize:
So the minimum number of single switch steps needed is 7, which matches option (b).