Price setting intermediate firms smets and wouters 2007

Hi! This may be a stupid question, but I’m blocked with the derivation of the Foc for the price setting problem of intermediate firms allowed to reoptimize in studying the microfoundation of SW ‘07 model:

In particular I don’t get how to approach the derivative of G’^(-1) in order to get the following foc at page 10 of the appendix

Can someone give me some suggestion on how to proceed? It would be very appreciated

Did you have a look at Kimball aggregator derivation