I think you used x in place of z in your definition of g:
Laplacian[x^2 + y^2 + z^2, {x, y, x}]
Shouldn't it be:
Laplacian[x^2 + y^2 + z^2, {x, y, z}]
?
But even after that fix, I think you're still going to have a problem. When you try to evaluate g[1,1,1] it will do all of the argument replacements first, and you'll end up with Laplacian[3, {1, 1, 1}].