Hi!

I only did the first, maybe this will give you a hint how to proceed.

Let the angle between the positive x-axis and y=m1x be called

and let the angle between y=mx and the positive x-axis be called

Then the angle is given by

How do you figure out ?

It has something to do with Tangens.

Letīs say you have the line

Then where the index 1 and 2 stand for the different lines.

Thus

And

Then you do the same for the other line.

And you end up with: