Your answer is easily checked by taking grad(f) .... and seen to be wrong.

Solve the following system of simultaneous pde's (all derivatives are partial derivatives):

df/dx = 3x^2 .... (1)

df/dy = 5z^2 .... (2)

df/dz = 10yz .... (3)

From (1): f = x^3 + g(y, z).

From (2): dg/dy = 5z^2 => g = 5z^2 y + h(z).

Therefore f = x^3 + 5z^2 y + h(z).

From (3): 10 zy + dh/dz = 10yz => dh/dz = 0 => h = constant. Take h = 0.

Therefore f = x^3 + 5z^2 y.