Analyzing the impact of change in a time series on another

I have two time series data: $x_t$ and $y_t$. I have developed an algorithm to detect unusual changes (activities) on my $x_t$ series, so that whenever there is a change detected (based on some criteria), a flag is up.

What I would like to do is to investigate the impact of the detected change at time $t$ in $x_t$ on my other series $y_t$, using historical data. By analyzing the data, I would like to understand whether there is an impact on $y_t$ at all, and if yes, is it effective at the same time step (time $t$) or there is a time lag between the change and the effect.

Can anyone suggest a method for this purpose?

Regards

As you do not specify the interactive of $x$ and $y$, then I try to answer your quiz from two ways. 1. If $x$ and $y$ have interactive impact, then you can compute the cross correlation of them to see how they affect each other and to build the VAR model. 2. If only $x$ will affect $y$, then you can explain it by a linear regression or some other regression models to describe the relation of them.