Substitute y from (1) into (2) and solve for the two values of x-coord.
Then from (1) get x = (y-d)/m , substitute this into (2) and solve for the two y-coord values.
Both these equations will have sqrt terms, as you are solving quadratics. If the value under the sqrt is zero, then both values are equal, and the line is tangent to the ellipse. If the value under the sqrt is negative, then there are no real solutions as the line does not intersect the ellipse.