Question 1168925
Time for Philip if alone,  p
Time for James if alone, p+2


--------------------------------------------------
worked together for 3 hours then philip left and james finished the job for one more hour. 
--------------------------------------------------


{{{(1/p+1/(p+2))*3+(1/(p+2))*1=1}}}
{{{3*RATETOGETHER+1*RATEONLYJAMES=1*JOB}}}


{{{3/p+3/(p+2)+1/(p+2)=1}}}


{{{3/p+4/(p+2)=1}}}

{{{3(p+2)+4p=p(p+2)}}}

{{{3p+6+4p=p^2+2p}}}

{{{7p+6=p^2+2p}}}

{{{p^2-5p-6=0}}}

{{{(p-6)(p+1)=0}}}

The solution which works is {{{highlight(p=6)}}}


Philip would need 6 hours alone.
James would need 8 hours alone.