My suggestion is to use algebra to derive arithmetic expressions for x and y in terms of m1, b1, m2, and b2.

Then write a program that gets user input for values of m1, b1, m2, and b2 and then...