# How to properly time-shift a function in relation to another function

I'm stuck on a time-variance question in my homework and I think it has something to do with my understanding of how time shifting functions works. The problem asks to determine whether the system defined below is time-variant or time-invariant. $$S: x(t) \to y(t) = x(t-2) + x(2-t) \tag{1}$$ I solved it such that $$x_{delayed}(t) = x(t - \tau)\tag{2}$$ and $$y_{delayed}(t) = x(t-\tau-2) +x(2-t +\tau) \tag{3}$$

Then I delayed the original output $y(t)$ from $(1)$ to $$y(t-\tau) = x(t-\tau-2) + x(2-t+\tau) \tag{4}$$ which I believe is incorrect. I think that instead, it should be $$y(t-\tau) = x(t-\tau-2) + x(2-t-\tau) \tag{5}$$

I believe my problem comes from my understanding of how to delay a function related to another function. Searching around didn't help much. Ultimately my question is, should $$y(t) = x(-t) \tag{6}$$ $$y(t - \tau) = x(-t + \tau\tag{7})$$ or $$y(t-\tau) = x(-t-\tau)\tag{8}$$ Using $(7)$ gives my my current answer, $(4)$, while using $(8)$ gives me what I believe is the correct answer, $(5)$. I have found proofs for both answers which only confuses me more, so which is correct and how should I time shift the function? Any help is welcome and appreciated, thanks.

See that if you are going to go from $y(t)$ to $y(t-\tau)$ then you should replace every $t$ in the first one with $t-\tau$. This means that, in your case,
$$y(t-\tau) = x(t-\tau-2) + x(2-(t+\tau)) = x(t-\tau-2) + x(2-t+\tau)$$
$$y(t) = x(-t)\implies y(t - \tau) = x(-(t - \tau))= x(-t + \tau)$$
The mistake was made in the transformation of the delayed input through the system. Using the system defined by $$S: x(t) \to y(t) = x(t-2) + x(2-t)\tag{1}$$ and $$x_{delayed}(t) = x(t-\tau)\tag{2}$$ The output should be \begin{align} y_{delayed}(t) & = x_{delayed}(t-2) +x_{delayed}(2-t)\tag{3}\\ &= x((t)-\tau-2) +x(2-(t)-\tau)\\ &= x(t-\tau-2) +x(2-t-\tau)\tag{4}\\ \end{align} which is not equal to the correctly determined $$y(t-\tau) = x(t-\tau - 2) + x(2-t+\tau)\tag{5}$$ This error happened because when plugging $(2)$ into $(3)$, I assumed that you plug in $t-\tau$ where there is a $t$ in $x_{delayed}(t)$. This is wrong, coefficients of $t$ in $x_{delayed}(t)$ only act on the $t$ in $t-\tau$, and not the $-\tau$. Thus, the result is $(4)$ which is not equal to $(5)$, and the problem is solved correctly.