The coefficient of \(x^2\) in \(\left( 1 + \frac{2}{p} x \right)^5\) is given by:
\(\binom{5}{2} \left( \frac{2}{p} \right)^2 = 10 \times \frac{4}{p^2} = \frac{40}{p^2}\)
The coefficient of \(x^2\) in \((1 + px)^6\) is given by:
\(\binom{6}{2} (p)^2 = 15p^2\)
Setting the sum of these coefficients equal to 70:
\(\frac{40}{p^2} + 15p^2 = 70\)
Multiply through by \(p^2\) to clear the fraction:
\(40 + 15p^4 = 70p^2\)
Rearrange to form a quadratic in \(p^2\):
\(15p^4 - 70p^2 + 40 = 0\)
Let \(q = p^2\), then:
\(15q^2 - 70q + 40 = 0\)
Using the quadratic formula \(q = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}\):
\(q = \frac{70 \pm \sqrt{70^2 - 4 \times 15 \times 40}}{30}\)
\(q = \frac{70 \pm \sqrt{4900 - 2400}}{30}\)
\(q = \frac{70 \pm \sqrt{2500}}{30}\)
\(q = \frac{70 \pm 50}{30}\)
This gives \(q = 4\) or \(q = \frac{2}{3}\).
Thus, \(p^2 = 4\) or \(p^2 = \frac{2}{3}\).
Therefore, \(p = \pm 2\) or \(p = \pm \frac{\sqrt{2}}{3}\).