\(\text{Let's say I can finish the job in }n \text{ hours} \\ \text{thus I work at a rate of }\dfrac{1~job}{n~hr} \\ \text{You finish the job in (}n-2) \text{ hours}\\ \text{and thus work at a rate of }\dfrac{1~job}{(n-2)~hr}\)
\(\text{When working together the rates combine.}\\ \text{I work 1 hour at a rate of }\dfrac{1~job}{n~hr} \\ \text{and then work 3 hours at a rate of } \left(\dfrac{1}{n}+\dfrac{1}{n-2}\right) \dfrac {job}{hr} \text{completing the job}\)
\(1~job = \left(\dfrac {1~job}{n~hr} \cdot 1~hr+\left(\dfrac 1 n+\dfrac{1}{n-2} \right)\dfrac{job}{hr} \cdot 3~hr\right)\)
dropping units for a moment
\(1 = \dfrac 1 n +\dfrac{2n-2}{n(n-2)}\cdot 3\)
\(n^2 - 2n = 7n-8 \\ n^2 -9n+8 = 0 \\ (n-1)(n-8) = 0 \\ n=1,~8\)
\(\text{n can't be 1 as that would make your partner finish the job in (-1) hours}\\ \text{so it must be that }n=8~ hrs\)
.