I'm trying to transform $rect(t)$ but depending on the order I apply the transformations, I end up with different results.
I start with $rect(t)$ and the goal is to get to $rect\left(\frac{t}{2}-\frac{1}{3}\right)$
Real briefly (just in case), $rect(t) = 1, \left|t\right| < \frac{1}{2}$
(apologies in advance for my bad handwriting and drawing skills!)
First Way (wrong):
Second Way (correct):
The length of both rectangles matches for both ways. It's just the roots that have different positions.
What's the reason why a stretch-and-shift works, but not a shift-and-stretch? I feel like maybe in the first way, I'm getting the stretch wrong?
Quick Fix: The ending function in the second picture should have a leftmost root of $-1/3$, not $1/3$


Here's another way that may be less confusing. You stated that $rect(t)=1$ for $|t|<1$, i.e. the limits of $rect$ being 1 are $\pm 1$. To get the limits of $rect\left ({t \over 2}-{1 \over 3}\right)$ being 1, just set $${t \over 2}-{1 \over 3}=\pm1$$ and solve for $t$.