Clear["Global`*"];
center = {p1, p2} = {0.2, .4};
axes = {a1, a2} = {.8, .4};
pole = {o1, o2} = {-1, -.5};
f[x_, y_] := (x - p1)^2/a1^2 + (y - p2)^2/a2^2 - 1;
line[x_polar[x_,
y_] := ((x - p1) (o1 - p1))/a1^2 + ((y - p2) (o2 - p2))/a2^2 -
1;
ellipsoid =
ContourPlot[
f[x, y] == 0 // Evaluate, {x, p1 - a1, p1 + a1}, {y, p2 - a2,
p2 + a2}, MeshFunctions -> Function[{x, y}, line[xpolar[x, y]],
Mesh -> {{0}}, AspectRatio -> Automatic, Axes -> False];
polarline =
ContourPlot[
line[xpolar[x, y] == 0 // Evaluate, {x, p1 - a1, p1 + a1}, {y, p2 - a2,
p2 + a2}, Mesh -> None];
pts = {x, y} /. NSolve[{f[x, y] == 0, line[xpolar[x, y] == 0}, {x, y}];
g = Graphics[{Red, AbsolutePointSize[5], Point@{o1, o2},
HalfLine[{{o1, o2}, pts[[1]]}], HalfLine[{{o1, o2}, pts[[2]]}]}];
Show[ellipsoid, polarline, g, PlotRange -> All]
length1 =
ImplicitRegion[{f[x, y] == 0, line[xpolar[x, y] >= 0}, {x, y}] //
ArcLength;
length2 =
ImplicitRegion[{f[x, y] == 0, line[xpolar[x, y] <= 0}, {x, y}] //
ArcLength;
{length1, length2}