Here consider the quadratic function
y=(x-a)(x-b). If we put y=0, we get the solution in x=a or b which are the roots. It is shown in the diagram.
Now if we bring down the entire graph by 1 unit we would get a new quadratic which is given as y=(x-a)(x-b)-1. Let us say that they would have roots as alpha and beta. So, clearly, from the diagram, we can see that alpha will be less than a and beta will be more than b. And that is what has been written down as the solution above.
and we obtain the new equation by simply adding the vertical distance, in this case, 2c to the equation to get the new function, again called y.
In the second case, we push the graph sideways along the x axis and as you can simply see the roots change. If we move the graph by k units rightwards, the new roots are simply the old roots + k units. Thus, we can immediately write down the new equation of the quadratic where we substitute the new roots and we are good to go.
It is simply this: if one root, alpha is negative, then the point where the quadratic cuts the x axis would be (alpha, 0). But the distance of that point from the Origin, and distance is a scalar quantity i.e. always positive, we have to take mod alpha to get the distance.
Similarly we can arrive at mod beta but since in the diagram shown beta is already in the positive direction of x axis we do not need to take mod.
Since c<0 the U shaped curve is shown.
We find the axis too from b>0 in the negative x direction
And finally from the diagram drawn, we can see that the value of mod alpha will be greater than beta. And that is our solution.
starting from the Right
we mark the first area as +
the second as minus
and the third as + again
and this simply gives us the range of values of x for which the y values are +, minus or plus. [we have also shown this in other ways i.e. noticing how the two arms of the quadratic are above the water while the little cup between the roots are below the x axis.
And above means y>0 and below means y<0]
So, there are two areas which are plusses and one that is minus.
This gives us the entire picture,
that D1> 0 for a<2 or a>3
while D1<0 when 2<a<3.
But it is given that the quadratic has real roots implying that the Discriminant is not less than zero.
Such intuitive knowledge is what the IIT level questions expect from you.
This question is quite straight forward. We find two equations from the Sum and Product of the roots and thereafter proceed to eliminate alpha to get a relationship between p and q.