Formula to make this comes from entering this in the CAS View (to find the two possible gradients)
Solve[4c_1-(b_1-m)^2/a_1=4c_2-(b_2-m)^2/a_2,m]
which gives
{m = ((a_1 * b_2) - (a_2 * b_1) + sqrt(((((-4) * a_1^(2)) * a_2) * c_1) + (((4 * a_1^(2)) * a_2) * c_2) + (((4 * a_1) * a_2^(2)) * c_1) - (((4 * a_1) * a_2^(2)) * c_2) + ((a_1 * a_2) * b_1^(2)) - ((((2 * a_1) * a_2) * b_1) * b_2) + ((a_1 * a_2) * b_2^(2)))) / (a_1 - a_2), m = ((a_1 * b_2) - (a_2 * b_1) - sqrt(((((-4) * a_1^(2)) * a_2) * c_1) + (((4 * a_1^(2)) * a_2) * c_2) + (((4 * a_1) * a_2^(2)) * c_1) - (((4 * a_1) * a_2^(2)) * c_2) + ((a_1 * a_2) * b_1^(2)) - ((((2 * a_1) * a_2) * b_1) * b_2) + ((a_1 * a_2) * b_2^(2)))) / (a_1 - a_2)}