Initial value problem differential equation $y' = (x-1)(y-2)$ $$y' = (x-1)(y-2)$$
$y(2)= 4$
$$\frac{1}{y-2}dy = (x-1)dx$$
$$\int \frac{1}{y-2}dy =\int (x-1)dx$$
$$\ln(y-2) = \frac{x^2}{2} - x + c$$
$$y - 2 = e^{\frac{x^2}{2} - x + c} $$
$$y = e^{\frac{x^2}{2} - x + c} + 2$$
plug in the inital value
$$y = e^{\frac{2^2}{2} - 2 + c} + 2$$
$$y = e^c+ 2$$
I feel like this is wrong anyways, so where did I go wrong?

It would be a good remark that in the step you wrote:
$$\ln(y-2)=x^2/2-x+c$$ we inserted this strong point: $$\ln|y-2|=x^2/2-x+c, ~~y\neq 2$$
Now, if we assume to find just one solution and having $y>2$, then $$y=\exp(x^2/2-x+c)+2=C\exp(x^2/2-x)+2$$ and therefore when $x=2$ then $y=4$ makes the latter equality:
$$4=C\exp(2-2)+2\longrightarrow C=2$$
