What you are doing here is simply splitting the equation into its y part and its x part. So you have
Integrate both sides. Fiddle about to get y. And then use y(2)=whatever to solve for the constant.