Voltage across capacitor/inductor in RLC circuit
Consider a series LCR circuit with an a.c. voltage, \$V=2\:\small V\$ applied. Let the resistance be \$R=1\:\Omega\$, and let the reactances be \$X_L=X_C=10\:\Omega\$, which means that the complex reactances are \$j10\$, and \$-j10\$.

The series circuit has an impedance: $$Z=R+jX_L-jX_C=1+j10-j10=1+j0$$

That is, \$Z\$ is a resistance of \$1\:\Omega\$ and the current through the R, L and C is: $$I=\frac{V}{Z}=\frac{V}{R}=\frac{2}{1}=2 A$$
Hence, the voltages across \$L\$ and \$C\$ will be: \$j I X_L= j20\: V\$, and \$-j I X_C= -j20\: V\$, respectively.

Therefore the capacitor and inductor each have voltages of \$20\:V\$, but these are \$180°\$ out of phase so they cancel each other when looking at the total voltage across the series configuration.