I'm trying to calculate the times and the angles (the red 'X') at which two objects 'A' (the blue dot) and 'B' (the red dot) that are travelling around a circle and start at different speeds and different angles will meet.
I had help creating an animated Geogebra file below, but I'm still having trouble converting the Geogebra functions into equations that I can then convert into octave m code, which is similar to matlab m code.
Although the graph at the bottom of your figure (showing the position of the dots as functions of time) is composed of many separate linear pieces between $0$ and $360$ degrees, you could model the position of each dot as a continuous function:
\begin{align} \text{angle}_A &= \text{start}_A + \omega_A t, \\ \text{angle}_B &= \text{start}_B + \omega_B t. \end{align}
Notice that this does nothing to constrain the angles to remain in any particular range of angles, in fact, one of the angles will increase without bound and the other will decrease to negative values without bound as time passes.
Now instead of looking for times when the angles are equal, you look for when they differ by a multiple of $360$ degrees. That is, you solve equations like
\begin{align} \text{start}_A + \omega_A t &= \text{start}_B + \omega_B t, \\ \text{start}_A + \omega_A t &= \text{start}_B + \omega_B t + 360^\circ, \\ \text{start}_A + \omega_A t &= \text{start}_B + \omega_B t + 720^\circ, \\ \text{start}_A + \omega_A t &= \text{start}_B + \omega_B t + 1080^\circ, \\ \end{align}
and so forth. This gives you a sequence of values of $t$ that are times when the dots meet. You should be able to show easily that the times are in an arithmetic sequence, so you can summarize all the meeting times with a simple equation like
$$ t_n = t_0 + n (t_1 - t_0) $$
where $t_0$ is one of the meeting times, $t_1$ is the next meeting time, and $t_n$ is the $n$th meeting time after $t_0.$
Once you know when the dots meet you can easily find where they will meet by taking the equation for either $\text{angle}_A$ or $\text{angle}_B,$ plugging in one of the meeting times $t_n,$ and then adding or subtracting a multiple of $360$ degrees to find the location on the circle.