Thanks. I have noticed the mistake I have made now. Why did you change C to C1 at the end?

I mainly changed the parameter to show that it had been algebraically manipulated/changed. If we pick up here:

\(\displaystyle \ln|x+6|=3t+C\)

This of course directly implies:

\(\displaystyle x+6=\pm e^{3t+C}=\pm e^Ce^{3t}\)

Now, if we let:

\(\displaystyle c_1=\pm e^C\)

And consider that we lost the trivial solution:

\(\displaystyle x(t)\equiv-6\)

when we separated the variables, this means \(c_1\in\mathbb{R}\), and we may state:

\(\displaystyle x+6=c_1e^{3t}\)

Hence:

\(\displaystyle x(t)=c_1e^{3t}-6\)

Treating the ODE as a linear equation, we avoid all this. Later, you will learn a method call undetermined coefficients that will allow you to solve linear equations even more efficiently. You will be able to see by inspection that the homogeneous solution is:

\(\displaystyle x_h(t)=c_1e^{3t}\)

And the particular solution must take the form:

\(\displaystyle x_p(t)=A\implies x_p'(t)=0\) (here \(A\) is a constant)

And by substitution into the ODE we find:

\(\displaystyle 0-3A=18\implies A=-6\)

Thus:

\(\displaystyle x_p(t)=-6\)

And, by the principle of superposition, we have the general solution:

\(\displaystyle x(t)=x_h(t)+x_p(t)=c_1e^{3t}-6\quad\checkmark\)