Let $P(A)=\large \frac{3}{7}$ (ie) Probability of A coming in time.
Therefore $P(A^1)=1-\large \frac{3}{7}$$=\large \frac{4}{7}$(ie) Probability of A not coming in time.
$P(B)=\large \frac{5}{7}$ (ie) Probability of B coming in time.
$P(B^1)=1-\large \frac{5}{7}$$=\large \frac{2}{7}$(ie) Probability of B not coming in time.
Therefore Probability of only one of them coming to school in time is
$P(A).P(B^1)+P(B)+P(A^1)$
$=\large \frac{3}{7}.\frac{2}{7}+\frac{5}{7}.\frac{4}{7}$
$=\large \frac{6}{49}+\frac{20}{49}=\frac{26}{49}$
Hence the probability of only one of them coming to school in time is $\large \frac{26}{49}$
The advantage of coming to school in time is we can relax ourselves and concentrate more during the class.