I am having trouble understanding how the author arrived at (4) from the step above it. The step above it consists of two double integrals. The first double integral is over the region $R_1$ and the second is over the region $R_2$. In the next step, they are converted to two line integrals: the first over the curve $C_1$ and the second over the curve $C_2$. However, the curve $C_1$ doesn't seem to cover the region $R_1$ and the curve $C_2$ doesn't seem to cover the region $R_2$. $C_1$ is the perimeter of the entire shape - not just the perimeter of $R_1$ and $C_2$ is the perimeter of the inner oval - not the perimeter of $R_2$.