If $Y$ is a regular function of $X$, $(X,Y)$ cannot have a density since $(X,Y)$ is always on the graph of the function, which has measure zero. But you should not use this to compute the distribution of $Z$ a function of $X$.
Rather, you could use the fact that $Z$ has density $f_Z$ if and only if, for every measurable function $g$, $ E(g(Z))=\int g(z)f_Z(z)\mathrm{d}z. $ But, if $Z=h(X)$, $E(g(Z))=E(g(h(X)))$, and by definition of the distribution of $X$, $ E(g(h(X)))=\int g(h(x))f_X(x)\mathrm{d}x, $ where $f_X$ is the density of $X$. In the end, you know $h$ and $f_X$ and you must make the two expressions of $E(g(Z))$ coincide for every function $g$, hence a change of variable I will let you discover should yield an expression of $f_Z$ depending on $f_X$.