Let the required terms be (a - d), a and (a + d).
Then (a - d) + a + (a + d) = 21
\(\Rightarrow\) 3a = 21
\(\Rightarrow\) a = 7
Also, (a - d)2 + a2 + (a + d)2 = 165
\(\Rightarrow\) 3a2 + 2d2 = 165
\(\Rightarrow\) (3 x 49 + 2d2) = 165
\(\Rightarrow\) 2d2 = 165 - 147 = 18
\(\Rightarrow\) d2 = 9
\(\Rightarrow\) d = \(\pm3\)
Thus, a = 7 and d = \(\pm3\)
Hence, the required terms are (4,7,10) or (10,7,4).