It says the reason right in the screenshot:
Now, since the unprimed and primed coordinates are independent, [itex]\nabla \times d\ell' = 0[/itex]
Here, [itex]d\ell[/itex] and [itex]d\ell'[/itex] are two different things. The first depends on "unprimed" coordinates (i.e. [itex]x, y, z[/itex]) and the second depends on "primed" coordinates [itex]x', y', z'[/itex]). The operator [itex]\nabla[/itex] differentiates only with respect to the unprimed coordinates. Hence, [itex]\nabla \times d\ell'[/itex] is zero because [itex]x', y', z'[/itex] are not functions of [itex]x,y, z[/itex]; they can't be differentiated with respect to the unprimed coordinates.
This use of primed and unprimed variables is pretty common in proofs of integral theorems, particularly when you have a function on the left that is, say, [itex]X(r)[/itex], generally the variable of integration on the right is [itex]r'[/itex]. For example,
[tex]E(r) = \int \frac{\rho(r')/\epsilon_0}{4\pi |r - r'|^2} \; dV'[/tex]
Here, [itex]r'[/itex] is the dummy variable of integration, and [itex]dV'[/itex] is the associated volume element for that variable.