First order ODE: $tx'(x'+2)=x$ $$tx'(x'+2)=x$$
First I multiplied it:
$$t(x')^2+2tx'=x$$
Then differentiated both sides:
$$(x')^2+2tx'x''+2tx''+x'=0$$
substituted $p=x'$ and rewrote it as a multiplication
$$(2p't+p)(p+1)=0$$
So either $(2p't+p)=0$ or $p+1=0$
The first one gives $p=\frac{C}{\sqrt{T}}$
The second one gives $p=-1$. My question is how do I take the antidervative of this in order to get the answer for the actual equation?

EDIT:
$x=t(x')^2+2tx'$
$p=x'$
$x=tp^2+2tp$
We differentiate in respect to $t$:
$p=p^2+t2pp'+2p+2tp' \Rightarrow p'(2tp+2t)=(p-p^2-2p) \Rightarrow p'(p+1)2t=-(p^2+p) \Rightarrow p'(p+1)2t=-p(p+1) \Rightarrow p'(p+1)2t+p(p+1)=0 \Rightarrow (p+1)(2tp'+p)=0 \\ \Rightarrow p+1=0 \text{ or } 2tp'+p=0 \\ \Rightarrow p=-1 \text{ or } p'=-\frac{1}{2t}p \\ \Rightarrow p=-1 \text{ or } \frac{p'}{p}=-\frac{1}{2t} \\ \Rightarrow p=-1 \text{ or } \ln{p}=-\frac{1}{2}\ln{t} +c\\ \Rightarrow p=-1 \text{ or } \ln{p}=\ln{t^{-\frac{1}{2}}} +c\\ \Rightarrow p=-1 \text{ or } p= \pm e^c \frac{1}{\sqrt{t}} \\ \Rightarrow x'=-1 \text{ or } x'= \pm e^c\frac{1}{\sqrt{t}} \\ \Rightarrow x(t)=-t+c_1 \text{ or } x(t)=2 C\sqrt{t}+c_2, \text{ where } C= \pm e^c$.
$$$$


*

*$x(t)=-t+c_1 \Rightarrow x'=-1$


Replacing this at the initial equation we get:
$x=t(x')^2+2tx' \Rightarrow -t+c_1=t-2t \Rightarrow -t+c_1=-t \Rightarrow c_1=0$
Therefore, $x(t)=-t$.
$$$$


*

*$x(t)=2 C\sqrt{t}+c_2 \Rightarrow x'(t)=\frac{C}{\sqrt{t}} $


Replacing this at the initial equation we get:
$x=t(x')^2+2tx' \Rightarrow 2 C\sqrt{t}+c_2=t\frac{C^2}{t}+2t\frac{C}{\sqrt{t}} \Rightarrow 2C \sqrt{t}+c_2=C^2+\frac{2Ct}{\sqrt{t}} \\ \Rightarrow 2Ct+c_2\sqrt{t}=C^2\sqrt{t}+2Ct \Rightarrow c_2\sqrt{t}=C^2\sqrt{t} \Rightarrow c_2=C^2$
Therefore, $x(t)=2 C\sqrt{t}+C^2$.
