Let $I$ be the ideal in $\mathbb{Q}[T]$ generated by $L=\{T^{2}-1, T^3-T^2+T-1,T^4-T^3+T-1\}$. Find $f\in\mathbb{Q}[T]$ such as $(f)=f\mathbb{Q}[T]=I$.
The book solution proves that $I\subseteq (T-1)$ and $(T-1)\subseteq I$.
Could I take the following approach as well?
As $f=T-1$ divides all the polynomials in $L$ and by definition
$\left<L\right>=\{h \mid h= g_{1}(T^{2}-1) +g_{2}(T^3-T^2+T-1) +g_{3}(T^4-T^3+T-1), g_{i}\in\mathbb{Q}[T]\}$
so $f$ divides any $h$ in the above set and hence it generates $I$.
Since $I=\langle L\rangle$ and $T-1$ divides all polynomials in $L$ you get that every polynomial in $I$ is a multiple of $T-1$, that is, $I\subseteq (T-1)$. (This is the part you proved.)
Conversely, we have to show that $(T-1)\subseteq I$, that is, $T-1\in I$. You know that the elements of $L$ are in $I$ and let's use them to show that $T-1\in I$: $$T^2-1=(T+1)(T-1)\in I$$ $$T^3-T^2+T-1=(T^2+1)(T-1)\in I$$ $$T^4-T^3+T-1=(T^3+1)(T-1)\in I$$ and $$(T^3+1)-T(T^2+1)+(T+1)=2,$$ so $2(T-1)\in I$ and since $2$ is invertible we get $T-1\in I$.