Finding x- and y-intercepts given a polynomial function