Concept:
This question is based on the relation between roots and coefficients of a quadratic equation.
For a quadratic equation:
\[
Ax^2+Bx+C=0
\]
If its roots are \(r_1\) and \(r_2\), then:
\[
r_1+r_2=-\frac{B}{A}
\]
Here, the roots of the second equation are obtained by adding \(h\) to each root of the first equation.
Step 1: Use the sum of roots of the first quadratic equation.
Given:
\[
ax^2+bx+c=0
\]
Its roots are:
\[
\alpha,\beta
\]
Therefore:
\[
\alpha+\beta=-\frac{b}{a}
\]
Step 2: Use the sum of roots of the second quadratic equation.
Given:
\[
px^2+qx+r=0
\]
Its roots are:
\[
\alpha+h,\quad \beta+h
\]
So, the sum of its roots is:
\[
(\alpha+h)+(\beta+h)
\]
\[
=\alpha+\beta+2h
\]
Also, from the equation \(px^2+qx+r=0\), the sum of roots is:
\[
-\frac{q}{p}
\]
Therefore:
\[
\alpha+\beta+2h=-\frac{q}{p}
\]
Step 3: Substitute the value of \(\alpha+\beta\).
From
Step 1:
\[
\alpha+\beta=-\frac{b}{a}
\]
Substitute this into:
\[
\alpha+\beta+2h=-\frac{q}{p}
\]
So:
\[
-\frac{b}{a}+2h=-\frac{q}{p}
\]
Step 4: Solve for \(h\).
Move \(-\frac{b}{a}\) to the right-hand side:
\[
2h=-\frac{q}{p}+\frac{b}{a}
\]
Rearrange:
\[
2h=\frac{b}{a}-\frac{q}{p}
\]
Now divide both sides by \(2\):
\[
h=\frac{1}{2}\left[\frac{b}{a}-\frac{q}{p}\right]
\]
Hence, the correct answer is:
\[
\boxed{(B)\ \frac{1}{2}\left[\frac{b}{a}-\frac{q}{p}\right]}
\]