To find when they will earn the same profit: we must set the equation of their profits equal:
[tex]-x^{2} +5x +12 = 6x\\-x^{2} -x+12 = 0\\x^2+x-12 = 0\\(x+4)(x-3) = 0[/tex]
To find the solution of the day when the earned the same profit: we must set (x + 4) = 0 and (x -3) = 0
we get x = -4 and x = 3
Thus after three days, both students will earn the same profit, the other solution is nonviable because one cannot work negative 4 days.