Finding a unit in $\mathcal{O}_{\mathbb{Q}(\theta)}$ where $\theta$ is the root of a particular monic polynomial

The notes of a module I'm doing has an example I don't quite understand.

If $$\theta$$ is the root of $$t^3-4t+2$$, then $$2\theta-1$$ is a unit of $$\mathcal{O}_{\mathbb{Q}(\theta)}$$. First note that $$2\theta-1$$ is a root of the monic integer polynomial $$\frac{1}{8} \left[(t+1)^3-4(4(t+1))+16\right]=t^3+3t^2-13t+1$$.

How did they find the polynomial above? I understand why they did it (the $$+1$$ in the end is useful later one to determine $$2\theta -1$$ is indeed a unit).

Short answer: that comes out from trying to get a $$\pm 1$$ as the constant term.
The general $$y=a\theta^2+b\theta+c\in\mathbb{Z}[\theta]\subset\mathbb{Q}(\theta)$$ has minimal polynomial $$y^3 - (3 c + 8 a) y^2 + (16 a^2 + 6 a b + 16 a c - 4 b^2 + 3 c^2) y - (4 a^3 + 8 a^2 b + 16 a^2 c + 6 a b c + 8 a c^2 - 2 b^3 - 4 b^2 c + c^3)$$ So you want, for a unit, $$-4 a^3 - 8 a^2 b - 16 a^2 c - 6 a b c - 8 a c^2 + 2 b^3 + 4 b^2 c - c^3 = \pm 1$$
For simplicity try $$a=0$$ and by switching signs we can assume RHS is $$1$$: $$2 b^3 + 4 b^2 c - c^3 = 1$$ so $$(a,b,c)=(0,2,-1)$$ is a choice, as are $$(0,-1,1)$$, $$(0,-1,-1)$$ or $$(0,-3,5)$$ (and of course $$(a,b,c)=(0,0,-1)$$ which is trivial). I think they are all the solutions with $$a=0$$ but haven't checked it.