Factor the top and bottom of the fraction.
g(x) = (x+2)(x-2)/[(x-5)(x+2)].
Notice that x cannot be equal to 5 or -2 because of the domain.
After reducing, you get
g(x) = (x-2)/(x-5) , x≠-2, x≠5.
But, notice that the reduced fraction has a value when x = -2: it is 4/7. This indicates a hole in the graph. It occurs at (-2, 4/7).
The idea here is: reduce the rational function after finding the values where the denominator is zero. Any excluded values which will make the reduced fraction defined give the holes.