The way you determine if something is conservative is by looking at the circulation field and confirming it is a zero vector. But that is not necessary to check. Because if you do not check you will end in a situation where there is no solution, henceforth no scalar potential.

Anyways, you need to find a function . Such that,

We need that,

Solving the first (partial) differencial equation we have,

.

Thus, is partial derivative along is,

But the second equation tells us,

Thus,

Thus,

Thus, solving the (partial) differencial equation,

Important, note that after you integrate along y (to solve the differencial equation) you end up with a function of two variables involving x and z (because it is as a constant). But over here you do not because there is no x term on the left, thus it is zero.

Thus,

We need to solve for .

We still did not yet use equation #3.

Differenciating along z we have,

But the problem says that,

Thus,

Thus,

Integrate along z,

.

Important, note like before usually when you integrate by a certain variable you end up with a multivarible term that places the role of a constant. But in this case everything is one variable so it can only be a constant.

Thus,