a) Suppose, by way of contradiction, that one can find rational numbers x, y, z such that 7=x2+y2+z2. Writing x, y, z as fractions and clearing denominators yield an equality like
7n2=a2+b2+c2,(∗)
where n, a, b, c are nonnegative integers, not all zero.
If n is even, then a, b, c are all even, as well (obviously, they cannot be all odd, and if exactly two of them are odd, the sum of their squares equals 2(mod4), while 7n2 equals 0(mod4)). Dividing by 4 yields
7n12=a12+b12+c12,
and, clearly, 0<a1+b1+c1<a+b+c.
If n1 is still even, we repeat the previous transformation (this can only happen finitely many times).
If n is odd, say n=2k+1, then 7n2=7⋅4k(k+1)+7=M8+7. Since the remainder of a square when divided by 8 equals 0, 1 or 4, we deduce that equality (∗) is impossible.
b) We induct on m. The base case m=1 follows from the hypothesis. We assume the statement true for all m≤n and prove it for n+1.
If n+1=2k, then k≤n, hence ak can be written as a sum of squares of three rational numbers, for instance ak=x2+y2+z2, where x≥y≥z. Then
a2k=(x2+y2+z2)2=(x2+y2−z2)2+(2xz)2+(2yz)2,
and the numbers x2+y2−z2, 2xz, 2yz are obviously rational numbers.
If n+1=2k+1, using a=x2+y2+z2, we get
an+1=a2k⋅a=a2k(x2+y2+z2)=(akx)2+(aky)2+(akz)2,