Step 1: Express the terms of the G.P. in terms of \( a \) and \( r \).
Let the first term of the geometric progression be \( a \) and the common ratio be \( r \). The terms of the G.P. are:
- First term: \( a \)
- Second term: \( ar \)
- Third term: \( ar^2 \)
We are given that the sum of the first two terms is 12:
\[
a + ar = 12
\]
We are also given that the third term is 16:
\[
ar^2 = 16
\]
Step 2: Solve the system of equations.
From \( a + ar = 12 \), we can factor out \( a \):
\[
a(1 + r) = 12
\]
From \( ar^2 = 16 \), solve for \( a \):
\[
a = \frac{16}{r^2}
\]
Substitute \( a = \frac{16}{r^2} \) into \( a(1 + r) = 12 \):
\[
\frac{16}{r^2} (1 + r) = 12
\]
Now, multiply both sides by \( r^2 \) to eliminate the denominator:
\[
16(1 + r) = 12r^2
\]
Expanding and simplifying:
\[
16 + 16r = 12r^2
\]
Rearranging the terms:
\[
12r^2 - 16r - 16 = 0
\]
Dividing by 4:
\[
3r^2 - 4r - 4 = 0
\]
Step 3: Solve the quadratic equation.
Now, solve the quadratic equation \( 3r^2 - 4r - 4 = 0 \) using the quadratic formula:
\[
r = \frac{-(-4) \pm \sqrt{(-4)^2 - 4(3)(-4)}}{2(3)}
\]
Simplifying:
\[
r = \frac{4 \pm \sqrt{16 + 48}}{6} = \frac{4 \pm \sqrt{64}}{6} = \frac{4 \pm 8}{6}
\]
Thus, the two possible solutions for \( r \) are:
\[
r = \frac{4 + 8}{6} = 2 \quad \text{or} \quad r = \frac{4 - 8}{6} = -\frac{2}{3}
\]
Step 4: Conclusion.
The two possible values for the common ratio are \( r = 2 \) or \( r = -\frac{2}{3} \).