First, find the coefficient of \(x^2\) in \(\left( 2 + \frac{x}{2} \right)^6\).
Using the binomial theorem, the term containing \(x^2\) is given by:
\(\binom{6}{2} \cdot 2^4 \cdot \left( \frac{x}{2} \right)^2 = 15 \cdot 16 \cdot \frac{x^2}{4} = 60x^2\)
So, the coefficient of \(x^2\) in \(\left( 2 + \frac{x}{2} \right)^6\) is 60.
Next, find the coefficient of \(x^2\) in \((a + x)^5\).
Using the binomial theorem, the term containing \(x^2\) is given by:
\(\binom{5}{2} \cdot a^3 \cdot x^2 = 10a^3x^2\)
So, the coefficient of \(x^2\) in \((a + x)^5\) is \(10a^3\).
According to the problem, the sum of these coefficients is 330:
\(60 + 10a^3 = 330\)
Solve for \(a^3\):
\(10a^3 = 270\)
\(a^3 = 27\)
\(a = 3\)