a) \(g'\left( x \right) = y' = {\left( {2x + \frac{\pi }{4}} \right)^,}.\cos \left( {2x + \frac{\pi }{4}} \right) = 2\cos \left( {2x + \frac{\pi }{4}} \right)\)
b) \(g'\left( x \right) = - 2{\left( {2x + \frac{\pi }{4}} \right)^,}.\sin \left( {2x + \frac{\pi }{4}} \right) = - 4\sin \left( {2x + \frac{\pi }{4}} \right)\)