Answer
$$\eqalign{
& {g_{xy}}\left( {x,y} \right) = 2\cos \left( {x - 2y} \right) \cr
& {g_{yx}}\left( {x,y} \right) = 2\cos \left( {x - 2y} \right) \cr} $$
Work Step by Step
$$\eqalign{
& g\left( {x,y} \right) = \cos \left( {x - 2y} \right) \cr
& {\text{Calculate }}{g_x}\left( {x,y} \right){\text{ treating }}y{\text{ as a constant}} \cr
& {g_x}\left( {x,y} \right) = \frac{\partial }{{\partial x}}\left[ {\cos \left( {x - 2y} \right)} \right] \cr
& {g_x}\left( {x,y} \right) = - \sin \left( {x - 2y} \right)\frac{\partial }{{\partial x}}\left[ {x - 2y} \right] \cr
& {g_x}\left( {x,y} \right) = - \sin \left( {x - 2y} \right) \cr
& {\text{Calculate }}{g_{xy}}\left( {x,y} \right){\text{ differentiating }}{g_x}\left( {x,y} \right){\text{ with respect to }}y \cr
& {\text{and treating }}y{\text{ as a constant}}{\text{.}} \cr
& {g_{xy}}\left( {x,y} \right) = \frac{\partial }{{\partial y}}\left[ { - \sin \left( {x - 2y} \right)} \right] \cr
& {g_{xy}}\left( {x,y} \right) = - \cos \left( {x - 2y} \right)\left( { - 2} \right) \cr
& {g_{xy}}\left( {x,y} \right) = 2\cos \left( {x - 2y} \right) \cr
& \cr
& {\text{Calculate }}{g_y}\left( {x,y} \right){\text{ treating }}x{\text{ as a constant}} \cr
& {g_y}\left( {x,y} \right) = \frac{\partial }{{\partial y}}\left[ {\cos \left( {x - 2y} \right)} \right] \cr
& {g_y}\left( {x,y} \right) = - \sin \left( {x - 2y} \right)\left( { - 2} \right) \cr
& {g_y}\left( {x,y} \right) = 2\sin \left( {x - 2y} \right) \cr
& {\text{Calculate }}{g_{yx}}\left( {x,y} \right){\text{ differentiating }}{g_y}\left( {x,y} \right){\text{ with respect to }}x \cr
& {\text{and treating }}y{\text{ as a constant}}{\text{.}} \cr
& {g_{yx}}\left( {x,y} \right) = \frac{\partial }{{\partial x}}\left[ {2\sin \left( {x - 2y} \right)} \right] \cr
& {g_{yx}}\left( {x,y} \right) = 2\cos \left( {x - 2y} \right) \cr} $$