Here's another way to do this.....maybe not as "clean" as heureka's and EP's answers....but....I might see it better....!!!!
Borrowing from their answers, the center of the circle is at (3,1) and the radius of this circle is
sqrt (2)....so......Call O =(0,0) and call (3,1) = C.....and the distance from O to C =
sqrt(3^2 + 1^2) = sqrt (10)
So....OC will form the hypotenuse of two right triangles with both having a leg length = to the raidus of the circle = sqrt (2)....and.......the remaining sides of these triangles will be the length of two segments drawn from O to the intersection points of the lines with the circle.
And this distance is sqrt ( 10 - 2) = sqrt (8)
So....a circle centered at (0,0) with a radius of sqrt (8) will intersect the circles at the same points as where the lines intersect the circle
So....the equation of the circle will be x^2 + y^2 = 8
Putting this into x^2+y^2-6x-2y+8=0 we have that
8 - 6x - 2y + 8 = 0
16 - 6x = 2y
8 - 3x = y
Subbing this into x^2 + y^2 = 8 we have
x^2 + (8 - 3x) ^2 = 8
x^2 + 9x^2 - 48x + 64 = 8
10x^2 - 48x + 56 = 0
5x^2 - 24x + 28 = 0
(5x - 14) (x - 2) = 0 → x = 14/5 = 2.8 and x = 2
So when x = 2 , y = 8 - 3(2) = 2 and when x = 2.8, y = 8 - 3(2.8) = -0.4
So the two intersection points are (2, 2) and ( 2.8, -0.4)
And since the lines pass through the origin we have
y = (2/2)x → y = x and y = (-0.4/ 2.8) → y = (-1/7)x
Here's a graph showing both lines and both circles :
https://www.desmos.com/calculator/xikled50m7