Why complicate this one . first of all one tip. never panic seeing a question. whenever u see such a question the answer is very easy just rewind the concept .
so here it is asking cpu efficincy . simply cpu efficency = usefull work done by cpu/ total time .
now there are n processes which will be running and after every process context switch willl occur.
total time=n*time qunatun(q)+ n*context switch time (s)=nq+ns .
what is the usefull work done by cpu . we know context switching the wastage time . the usefull time will be only nq. because in that time cpu was doing usefull work .
A-
cpu efficiency =nq/nq+ns=q/q+s
b- now it is giving s=q. just replace s with q then it is q/q+q=q/2q=1/2