Let's say I have two objects $x$ and $y$ whose position at time $t$ is given by: $$ x = a_xt^2+b_xt+c_x \\ y= a_yt^2+b_yt+c_y $$
And I want to find which (if any) values of $t$ cause $x$ to equal $y$. That is $$ (a_x-a_y)t^2+(b_x-b_y)t+(c_x-c_y) = 0 $$
This can easily be solved with quadratic equation. But what about the case when $a_x = a_y$? Now obviously this makes the problem much simpler to solve by hand! But if I were writing, lets say a simulation, where $a_x$ didn't necessarily equal $a_y$, but it could, how would I go about solving the equation? Preferably I'm looking for some sort of algorithm/equation that I can use to avoid having to write separate logic for the cases where $a_x = a_y$ and $a_x \neq a_y$.
Quick background: I have knowledge of math up to Linear Algebra (I feel a very simple answer lies here, but I can't quite work it out) and ~1/2 a course in Differential Equations (though I think that doesn't really apply here), but I'm more than willing to learn something new if it provides an easy way of solving my problem. Thanks!