For $a, 7, b, 23$ to be in A.P., the common difference $d$ must be constant.
Common difference: $d = \dfrac{23 - 7}{3} = \dfrac{16}{3}$
(Since there are 3 equal steps from 7 to 23 via $b$: positions 2, 3, 4)
$$a = 7 - d = 7 - \frac{16}{3} = \frac{21 - 16}{3} = \frac{5}{3}$$
$$b = 7 + d = 7 + \frac{16}{3} = \frac{21 + 16}{3} = \frac{37}{3}$$
Therefore, $a = \dfrac{5}{3}$ and $b = \dfrac{37}{3}$.
Source: Chapter 5, Exercise 5.2
---
Wait — recheck: positions are 1→2→3→4, so $23 = 7 + 2d \Rightarrow d = 8$.
Correction to model answer:
$d = \frac{23-7}{2} = 8$; $a = 7 - 8 = -1$; $b = 7 + 8 = 15$.
The examiner expects: $a = -1$, $b = 15$. Use the fact that 7 is the 2nd term and 23 is the 4th term, so $23 - 7 = 2d$.