If the focal length of ellipse x ^ 2 / M + y ^ 2 / 2 = 1 is the same as that of ellipse x ^ 2 / 8 + y ^ 2 / 18 = 1, then the value of M is?

If the focal length of ellipse x ^ 2 / M + y ^ 2 / 2 = 1 is the same as that of ellipse x ^ 2 / 8 + y ^ 2 / 18 = 1, then the value of M is?

The focal length of ellipse x ^ 2 / 8 + y ^ 2 / 18 = 1 is 2C = 2 √ 10
When the focus is on the x-axis, m-2 = 10, M = 12
When the focus is on the y-axis, 2-m = 10, M = - 8