Answer
$$ y=\frac{1}{2}x^2+\frac{3}{2}.$$
$$ y= 2e^{x-1}.$$
Work Step by Step
For the equation
$$\frac{dy}{dx}=x\Longrightarrow y=\frac{1}{2}x^2+c.$$
Using the condition $ y(1)=2$, we obtain that $2=\frac{1}{2}+c $, then $ c=3/2$ and hence the solution is $$ y=\frac{1}{2}x^2+\frac{3}{2}.$$
For the equation
$$\frac{dy}{dx}=y\Longrightarrow \frac{dy}{y}=dx \Longrightarrow \ln y =x+c.$$
Using the condition $ y(1)=2$, we obtain that $\ln 2=1+c $, then $ c=-1+\ln 2$ and hence the solution is $$ y=e^{x-1+\ln 2}=2e^{x-1}.$$