Gusto interview question

Mathematical calculation of different cases