Simple problem regarding rectangular pulse shifting
Clearly, in this example you have $h(t)=h(T-t)$. The easiest way to see this is to check for which value of $t$ the argument becomes zero. So the point $t=0$ of the original function is mapped to the point $t=T$, and because you have $-t$ in the argument, the function is inverted on the time axis.

The mistake in your first approach is the way you added the value of $T$. What you should have done is replace $-t$ by $T-t$ (which is what's happening on the left-hand side of the equation), to obtain $h(T-t)=1$ for $0&lt;T-t&lt;T$, which is equivalent to $0&lt;t&lt;T$, corresponding to the correct solution.