What is the average of $\DeclareMathOperator{\rect}{rect} \rect(\cos(\pi t/2)) $?
The given signal is clearly periodic. So just follow these steps and find the solution:

Find the period $T$.
Figure out the interval within a period for which the signal equals $1$.
Compute the average: $$\overline{x(t)}=\frac{1}{T}\int_0^Tx(t)dt$$

If you're convinced that you did everything right, don't worry about a given solution which is different.