A wrong answer here shows whether the student can substitute into $Z=\sqrt{R^2+(X_L-X_C)^2}$ at all; it is the entry step before phase angle is introduced.
A series circuit contains a resistor of resistance $R = 30\ \Omega$, an inductor of reactance $X_L = 40\ \Omega$ and a capacitor of reactance $X_C = 10\ \Omega$. Calculate the impedance $Z$ of the circuit.
Worked solution
Use $$Z=\sqrt{R^2+(X_L-X_C)^2}.$$ Substitute: $$Z=\sqrt{30^2+(40-10)^2}=\sqrt{900+900}=\sqrt{1800}\approx 42\ \Omega.$$ The impedance is about $42\ \Omega$.