Both solutions are correct, meaning that with either value of D the equation meets the condition that y(x_0) = y_0. I have attached a plot showing the two solutions for (X_0,Y_0) = (1,1) - note that they both pass through (1,1). You can't pick one over the other without introducing some other constraint, such as the slope at x_0 or the value for y at another point.