Answer
$$ f=y \space x \sin (z)+c $$
Work Step by Step
We have $$ f=y \space x \sin (z) +g(y,z)$$
and $$ g(y,z)=0 \implies g(y,z)=h(z)=0$$
So, $ f=y \space x \sin z+h(z)$
Now,
$ f_z=yx \cos z+h'(z)=yx \cos z $
So, $$ f=y \space x \sin (z)+c $$