Consider an electrical motor on its own:
A voltage source exciting the stator resistance & inductance. The resultant current produces torque which produces an acceleration against an inertia, with some damping.
We know:
**MOTOR: Electromagnetic & mechanical **
\$T = K_t i \$
torque equals constant multiplied by current
\$V = K_e \omega = K_e \dot{\Theta_a}\$
We know the backEMF voltage is proportional to velocity
\$T = J \ddot{\Theta_a} + D\dot{\Theta_a} \$
The Motor torque is that needed to accelerate an inertia with the damping torque subtracted.
\$ L_a\frac{di}{dt} + R_ai_a = e_a - K_e \dot{\Theta_a}\$
The voltage across the stator resistance and inductance equals the supply voltage minus the backEMF voltage (velocity dependant). With the stator current being that which flows through this network.
S-Domain (for clarity)
\$s(Js + D)\Theta_a(s) = K_tI(s) \$
\$(L_as + R_a)I(s) = E_a(s) - Ke\Theta_a(s) \$
Exam Question
The question authors query has additional complication via a load inertia & load damping all coupled via gearing.
Equally it does not include stator inductance (???) yet expects the final equation to include inertia and acceleration (???). One could argue in steady-state the inductor term drops out of the final equation (speed has settled, load has settled, backEMF has settled -> no change on the electrical side). HOWEVER, if steady-state is assumed then inertia & acceleration drops out.
Personally I think the question has been stripped back too much, but if that is what has been shown... lets drop the \$ L_a\frac{di}{dt}\$ term.
By reflecting the inertia and the damping to the primary side of the gearbox:
\$ J = J_a + (\frac{N_1}{N_2})^2J_L \$
\$ D = D_a + (\frac{N_1}{N_2})^2 D_L \$\$ D = D_a + (\frac{N_1}{N_2}) D_L \$
The question is using the subscript m to denote the total inertia and load as seen by the motor. The load specific has a subscript L and the "motor specific" has a subscript a (to denote armature?)
Combining:
\$e_a = \Theta_a s (\frac{R(Js + D)}{K_t} + K_e )\$
\$e_a = \Theta_a s (\frac{R((J_a + (\frac{N_1}{N_2})^2J_L)s + (D_a + (\frac{N_1}{N_2})^2 D_L))}{K_t} + K_e )\$\$e_a = \Theta_a s (\frac{R((J_a + (\frac{N_1}{N_2})^2J_L)s + (D_a + (\frac{N_1}{N_2}) D_L))}{K_t} + K_e )\$
\$e_a = \dot{\Theta_a}(\frac{R((J_a + (\frac{N_1}{N_2})^2J_L)s + (D_a + (\frac{N_1}{N_2})^2 D_L))}{K_t} + K_e )\$\$e_a = \dot{\Theta_a}(\frac{R((J_a + (\frac{N_1}{N_2})^2J_L)s + (D_a + (\frac{N_1}{N_2}) D_L))}{K_t} + K_e )\$
Finally as it is needed to be in terms of \$\Theta_L\$
\$e_a = \dot{\Theta_a}\frac{N_1}{N_2}(\frac{R((J_a + (\frac{N_1}{N_2})^2J_L)s + (D_a + (\frac{N_1}{N_2})^2 D_L))}{K_t} + K_e )\$\$e_a = \dot{\Theta_a}\frac{N_1}{N_2}(\frac{R((J_a + (\frac{N_1}{N_2})^2J_L)s + (D_a + (\frac{N_1}{N_2}) D_L))}{K_t} + K_e )\$
since \$\Theta_m = \frac{N_2}{N_1}\Theta_L \Rightarrow \Theta_L = \frac{N_1}{N_2}\Theta_m\$