Some people call this curve a "racetrack", especially in engineering.
You can fake an "analytic" equation. Let $L$ be the line segment between the two circle centers, and let $r$ be the radius of the circles. Then the curve has equation
$$ d(\mathbf x, L) = r$$
where $d$ denotes the usual distance function. This technique makes the curve look tidy and "analytic" and hides its piecewise nature. Good for writing papers, maybe, but not much else. To do any computations, you'll still have to go back to the piecewise form (two lines and two semi-circles).
Even tidier ... if $B$ is the unit ball in $\mathbb R^2$ then the racetrack set is $L + rB$. Actually, in this form, it might be useful for doing calculations, since quite a lot is known about how to compute with Minkowski sums. Probably not much use to the OP, but might be interesting to more erudite readers.
Regarding line intersections ...
Suppose the racetrack is positioned with its center at the origin. The top line is $y=r$, the bottom line is $y=-r$, and the right-hand end is the circle with equation $(x-h)^2 + y^2 = r^2$. Here, $h$ is the "half-width" of the racetrack, between centers, so that the distance between the two semi-circle centers is $2h$.
Now, suppose we take a line through the center that has an angle $\theta$ with the $x$-axis, where $\theta \ge 0$. This line has equation $y = mx$, where $m = \tan\theta$. It intersects the top edge of the racetrack when $y=r$, and this happens when $x = r/m$. But this calculation is only valid if $r/m \le h$, i.e. if $\tan\theta \ge r/h$. On the other hand, if $\tan\theta < r/h$, then the angled line intersects the ends of the racetrack (the semi-circles). To find the $x$-coordinate of the right-hand intersection, we have to find the larger of the two solutions of the equation $(x-h)^2+(mx)^2=r^2$. After doing that, we find the corresponding $y$-value from the equation $y=mx$.