In the beginning you want to get some work done by $2$ person in $x$ hours,so you calculate how much work if done by $2$ person per hour your total work will be done in $x$ hours?
Let $x$ hours be required to do some work, then how much work needs to be done per hour?
$x $hour $\to$ total work
$1$ hour $\to$ how much work?
$\Rightarrow$per hour if $1/x$ work is done then the work gets completed...(I)
Then you contact $A$, and $A$ says that he/she will take $(x+8)$ hours to complete the work.
So you calculate if $A$ takes $x+8$ hours to complete the work, that means $A$ does $\frac{1}{x+8}$ work per hour...(II)
Then you contact $B$, and $B$ says that he/she will take $(x+4.5)$ hours to complete the work.
So you calculate if $B$ takes $x+4.5$ hours to complete the work, that means $B$ does $\frac{1}{x+4.5}$ work per hour...(III)
then you decide to hire both of them and they both working together finish the job in $x$ hours(read 1st line bold words), that means their work output combined together was $1/x$ per hour
$\Rightarrow$(II)+(III)=(I)
$\frac{1}{x+8}+\frac{1}{x+4.5}=\frac{1}{x}$
$\frac{2x+12.5}{(x+8)(x+4.5)}=\frac{1}{x}$
$2x^2+12.5x=x^2+12.5x+36$
$x=6$