Is taking square root of both parts of equation in this way is an equivalent transformation of the equation?

For any real number $a$ and $b$, $a^2=b^2$ if and only if $|a|=|b|$. So, a real number $x_0$ is a solution to the equation $$ (2x+7)^2=(2x-1)^2,\tag{1} $$ if and only if $x_0$ is a solution to the equation $$ |2x+7|=|2x-1|.\tag{2} $$

Equation (1) and Equat. (2) are equivalent. So what you did is OK.


One does not necessarily introduce the variable $t$ though: Equat. (2) implies that $$ 2x+7=2x-1\quad \textbf{or}\quad 2x+7=-(2x-1). $$ Since $2x+7=2x-1$ is impossible, one has $2x+7=-(2x-1)$ and thus $$ x=\frac{-7+1}{2}=-\frac32. $$