ReplaceAll[{x^3 - 2 x y + 2 y z - z^2, 4}, {x -> 2, y -> 1, z -> 4}]