if you mean then this calls for a simple application of the chain rule for differentiation...

...where straight continuous line differentiate downwards with respect to x and the straight dashed line with respect to the dashed balloon expression, so that the triangular network satisfies the chain rule...