If given some function (in this case it's a Green function but that's not important here as my question is much more simple) and you are given that it's derivative is $$\bbox[yellow]{\frac{\mathrm{d}}{\mathrm{d}x}G(x,x^{\prime}) = \begin{cases} A(x^{\prime})\cos x, & \text{for}\quad x\lt x^{\prime} \\ -B(x^{\prime})\sin x, & \text{for}\quad x\gt x^{\prime} \end{cases}}$$
Now you ask yourself $$\fbox{$\color{blue}{\text{What is the Change in}\, \frac{\mathrm{d}G}{\mathrm{d}x}\text{at}\,x=x^{\prime}}\,\color{#F80}{\text{?}}$}$$
The book answer says that:
The Change in $\dfrac{\mathrm{d}G}{\mathrm{d}x}$ at $x=x^{\prime}$ is $\color{red}{-B(x^{\prime})\sin x^{\prime} - A(x^{\prime})\cos x^{\prime}}$
I do not understand the logic behind the equation marked $\color{red}{\mathrm{red}}$. In other words; Why does subtraction of $A(x^{\prime})\cos x$ from $-B(x^{\prime})\sin x$ give the Change in $\dfrac{\mathrm{d}G}{\mathrm{d}x}$ at $x=x^{\prime}$?
Or, put in another way; Why is the Change in $\dfrac{\mathrm{d}G}{\mathrm{d}x}$ at $x=x^{\prime}$ not $\color{#180}{A(x^{\prime})\cos x^{\prime}-B(x^{\prime})\sin x^{\prime}}$ at $x=x^{\prime}$? Where I simply subtracted the functions the other way round. Why am I even subtracting in the first place? Why not add the functions together?
Any help will be greatly appreciated.