For this type of problems, we try to work with the rate of production per unit time.
Let
x=rate of production of old machine (parts/hour)
x+2=rate of production of new machine (parts/hour)
"the new machine finished a certain job in 7 hours while the old one needed 8 hours to produce the same number of engine parts. "
means
7(x+2) = 8x
Solve for x
8x-7x=14
x=14 parts/hour (rate of old machine)
x+2=16 parts/hour (rate of new machine)
Check: 7(14+2)=112, 8(14)=112 ✔