and y(t) is as follows:
A*y(old)+B=y(new)
As x(t)=2 is replaced with y(t)=-2 in y(t) graph so put this in above equation
A*(2)+B=-2 ..............eqn(1)
now take another point
A*(-1)+B=-4...............eqn(2)
by solving eqn(1) and eqn(2) we get
A=-2
B=+2
Now for the time transformation we the equation as follows
A*t(new)+B=t(old)
As in x(t) graph -2 is replaced with 2 in y(t) graph
so
A*(2) + B=-2...............eqn(3).
now the second equation is.
A*(-0.5)+B=3............. eqn(4)
by solving eqn(3) and eqn(4).
A=-2
B=2
so the final y(t) can be written as:
y(t)=-2*(x(-2*t+2))+2
by using this approach we can express x(t) as function of y(t).
Matlab Code will be uploaded soon.