Answer
$g_{xx}=2y-ysinx$
$g_{yy}=-cosy$
$g_{xy}=g_{yx}=2x+cosx$
Work Step by Step
Take the first partial derivatives of the given function. When taking partial derivative with respect to x, treat y as a constant, and vice versa:
$g_x=2xy+ycosx$
$g_y=x^2-siny+sinx$
Then take the derivative of the first order partial derivatives to find second partial derivatives:
$g_{xx}=2y-ysinx$
$g_{yy}=-cosy$
Second partial derivatives of first order partial derivatives of x with respect to y and y with respect to x are the same:
$g_{xy}=g_{yx}=2x+cosx$