Since the voltage is in phase with the current in series RLC circuit, this means the current is flowing at resonant frequency.
At resonance, Capacitive reactance is equal to inductive reactance i.e. XC=XL
Given : R=5Ω L=50mH=0.05 H fr=50 Hz
Resonant frequency is given by fr=12π√LC
∴ 50=12π√0.05C
⟹ C=200μF
Impedance of circuit Z=√R2+(XC−XL)2
⟹ Z=R (∵XC=XL)
Thus Z=5Ω