P's 1 day's work =120 and Q's 1 day's work =130 P's work for 5 days =120×5=520=14
Therefore, the remaining work =1−14=34 (as the total work is always 1 ). This remaining work was done by both P and Q.
Work done by P and Q in a day =120+130=560=112
Therefore, the number of days they worked together =3/41/12=34×121=9 days.
So, Q left after 9 days from the day the work started.