I have a signal $A(t)$ and it's been transformed using an unknown system to a signal $A'(t)$. I also have another output signal $B'(t)$ from the same system and I want to retrieve the corresponding input signal $B(t)$. I wanted to first calculate the frequency response of the system, and then divide the Fourier transformed version of $B'(t)$ by it. Is this a good way? $H(\omega) = \frac{A'(\omega)}{A(\omega)}$ and then $B(\omega) = \frac{B'(\omega)}{H(\omega)}$ and then I can perform inverse Fourier transform on the $B(\omega)$. Is this a good and practical way? I'm trying to do it in Python or Matlab and I want it to be both theoretically and practically correct (I am a bit confused about doing the division part in my code.)