.
Your first equation is
a + ar + ar^2 = 14 (1)
Let's will make the second equation.
Since the(2) is an AP : (ar+1) = [(a+1) + (ar^2 - 1)]/ 2
Simplify it by canceling "1" and "-1" inside the [ . . . ].
(ar+1) = [a + ar^2]/ 2
2ar + 2 = a + ar^2
a - 2ar + ar^2 = 2 (2)
Write equations (1) and (2) together
a + ar + ar^2 = 14 (1)
a - 2ar + ar^2 = 2 (2)
Subtract eq(2) from eq(1)
3ar = 12
ar = 12/3 = 4. (3)
Now, in equation (1), replace ar by 4 TWO TIMES, based on (3). You will get then
a + 4 + 4r = 14
a + r = 14-4 = 10.
Now you have two equations
a + r = 10
and
ar = 4.
You can solve it via substitution a = 10 - r
(10-r)*r = 4
10r - r^2 = 4
r^2 - 10r + 4 = 0
and so on . . .