# Rectangular wire in the magnetic field

I'm trying to understand the following example which is taken from "Introduction to Electrodynamics" by David J. Griffiths:

Problem: The calculation of emf is clear. We take a snapshot of the loop and determine $$\text{emf} = \oint \vec{f}.d\vec{l}$$where $$\vec{f}$$ is the force per unit charge. I don't understand how the work done per unit charge is calculated. The vector $$d\vec{l}$$ points straight up, so why do we have the following equation?$$\int \vec{f}_{pull}.d\vec{l}= (uB)(\frac{h}{\cos \theta})\sin \theta$$ How do we know that $$\vec{u}$$(vertical velocity) is constant? This calculation is really confusing to me and it seems there are lot of unstated assumptions.

Once accepting that their velocity in the wire is $$u$$, the elementary work done by who is pushing the loop is $$dE = \mathbf {F.dx} = (\mathbf u \times \mathbf B) \mathbf {.dx}$$
$$\mathbf u \times \mathbf B$$ has a magnitude of $$uB$$ because the vectors are perpendicular and is horizontal. The displacement of charges $$\mathbf {dx}$$ has the direction of the vectorial sum of the velocity of the loop $$v$$ and the velocity of the charges in the wire $$u$$. If the resultant $$w$$ has an angle $$\theta$$ with the vertical, the elementary displacement is $$\frac{dl}{cos{\theta}}$$. And the angle of the horizontal force with $$w$$ is $$sin(\theta)$$.
As the magnitudes and angles are constants, it is an integral of $$dl$$ resulting in $$uB\frac{h}{cos(\theta)}sin(\theta)$$