Given
f(g)=(-10*g^2+17*g-6) / (-15*g^2-2*g+24)
Factor both numerator and denominator,
f(g)=-(2g-1)(5g-6)/(-(3g+4)(5g-6))
if 5g-6≠0, we can cancel out the factor (5g-6).
We can also cancel the negative signs to simplify to
f(g)=(2g-1)/(3g+4) on condition that g≠6/5