Answer
They do not have the same domains,
thus f and g are not the same function.
Work Step by Step
The domain of a real function ( a function defined on real numbers)
is the set of numbers for which f(x) is defined (for which f(x) can be calculated).
$f(x)=\displaystyle \frac{x^{2}}{x} $ is not defined for $x=0.$
$g(x)=x$ is defined for all real numbers.
They do not have the same domains,
thus the functions are not the same function.