The solution to this definite integration problem involves considering $t=1/y$ to make a change of the integration bounds. However after solving in terms of $y$ they directly substitute back into $t$ disregarding the earlier substitution.
Shouldn't it be substituted back as $y=1/t$ when or why can we just replace a variable with another like that?

This works because $y$ and $t$ are just variables that we can arbitrarily change, after the substitution:
$$\int^x_1 \frac{\log y}{y(1+y)}dy \equiv \int^x_1 \frac{\log t}{t(1+t)}dt$$
And so the two integrals can be summed together. Hope this helps.