Answer
The sorted list is $\{1,3,4,5,7\}$. Please check the solution to have a look at how the algorithm would work.
Work Step by Step
The key property of the bubble sort is that at the end of iteration $i$, the last $i$ values would be in the correct position. For example, after the first iteration, the greatest value would be at the last location. During each iteration, for some value $m$ and all values of $i$ such that $i < m$, we check $a_i$ and $a_{i+1}$ and interchange if need be.
For this example, the list is $\{3, 1, 5, 7, 4\}$.
During the first iteration, comparing each pair, we get the following - $\{1, 3, 5, 4, 7\}$. $1$ and $3$ get swapped and same thing with $4$ and $7$. Notice that 7 is the only element in the correct position
During the second iteration, comparing each pair, we get the following - $\{1, 3, 4, 5, 7\}.$ In this iteration, $4$ and $5$ get swapped.
Notice that even though the array is now in the proper order, there are still two more iterations in which nothing changes. Note that exercise $37$ addresses this issue and resolves it.