The magnitude model uses an exact right triangle. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Resistance and reactance are triangle legs
Resistance is 3 ohms and reactance magnitude is 4 ohms.
R=3Ω,X=4Ω
The impedance magnitude closes the triangle
The checked magnitude is 5 ohms because 3 squared plus 4 squared equals 5 squared.