For the particular circuit and frequency of measurement shown, the apparent impedance varies over the waveform period, it is not a constant. So you can't determine a fixed value for the impedance. The impedance is time varying which is shown by the waveform.
To get a constant impedance you would have to set Vs=0.
In normal engineering practice you would not determine the impedance of the circuit shown with Vs active. In other words, it appears to be an odd academic problem.