def simul(a1, b1, c1, a2, b2, c2):
    """
    this solves the simul equations of the form:
    a_1x + b_1y = c_1
    a_2x + b_2y = c_2
    """
    # write y in terms of x then solve for y.
    """
    y = (c1- a1x)/b1
    a2x + b_2 ((c1-a1x)/b1) = c2
    b1*a2x + b2*c1 -b2*a1x = b1*c2
    x (b1*a2 - b2*a1) = b1*c2 -b2*c1
    """
    # exp1 = b1*a2 - b2*a1
    # exp2 = b1*c2 - b2*c1
    # x = exp1/exp2
    # exp3 = c1 - a1*x
    # y = exp3/b1
    x = (b1*a2 - b2*a1)/(b1*c2 - b2*c1)
    y = (c1 - a1*x)/b1

    return x, y