When two people work together (or machines work, or hoses fill a tank, etc) theirratesof work add. Let p be the rate of work of p in "job per hour" and let q be the rate of work of Q in "job per hour". Together they work at the rate of p+ q "job per hour".

Surely that's not right. If all we know is that it take P "more than 8 hours more" we have no idea how long it would actually take. You must meanFor P alone it takes more than 8 hours more to complete the job than if both worked together

A rate p "job per hour" it would take P 1/p hours to complete the job. At p+ q, working together, it would take 1/(p+ q) hours.For P alone it takes 8 hours more to complete the job than if both worked together

1/p= 1/(p+ q)+ 8.

At rate q "job per hour" it would take Q 1/q hours to complete the job.If Q worked alone, he would need 4 and half hours more to complete the job than they both work together.

1/q= 1/(p+ q)+ 4.

Solve those two equations for p and q and then find 1/(p+ q).