Given any integer $z$, what are all the integer solutions possible that create a square prism of length $x$ with a height of length $y$? For example, if $z=25$, some possibles solutions are a $5\times 5$ square prism with a height of $1$ or a square prism that is $1\times 1$ with a height of $25$.
Would the formula $yx^2=z$ be a way to figure this out and would this be a diophantine equation?
Yes, $yx^2=z$ is a good way to represent the situation and if you demand that all the variables be naturals it is a Diophantine equation. Now if you factor $z$ you can find the solutions easily. $x$ can be any factor that you can square, then $y$ is what is left.