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?

Continuing from your last step:
$$
y = e^c + 2 = 4\\
\Rightarrow c = \ln2
$$
finally giving
$$
y = e^{\frac{1}{2}x^2-x+\ln2} +2
$$
or equivalently,
$$
y = 2e^{\frac{1}{2}x^2-x} +2
$$
