On page $42$ of Do Carmo's Differential Geometry of Curves and Surfaces he defines a rigid motion in $\mathbb{R}^2$ as a map $F: \mathbb{R}^2 \rightarrow \mathbb{R}^2$ given by $(\bar{x}, \bar{y}) \rightarrow (x,y)$ as Equation $(6)$ given by:
$$x = a + \bar{x}\cos(\phi)- \bar{y}\sin(\phi)$$ $$y = b + \bar{x}\sin(\phi)+ \bar{y}\cos(\phi)$$
i.e., a rotation about the origin followed by a translation.
On page $44$ he then writes that Equation $(6)$ maps the line $x \cos (\theta) + y \sin (\theta) = p$ (for constants $\theta$ and $p$) into the line
$$ \bar{x} \cos (\theta - \phi) + \bar{y} \sin(\theta - \phi) = p - a \cos(\theta) - b \sin (\theta)$$
I'm a bit confused about this last equation. Seems to me that for $(x,y) \in \mathbb{R}^2$ with $x \cos (\theta) + y \sin (\theta) = p$, that
$$F(x \cos(\theta), y \sin (\theta))$$
$$= (a + x \cos (\theta) \cos (\phi) - y \sin(\theta) \sin(\phi), b + x \sin(\theta) \sin (\phi) + y \sin(\theta) \cos (\phi))$$ Not sure why either the RHS or LHS of the following equation satisfies the line that $F$ maps $x \cos(\theta) + y \sin (\theta)$ onto: $$ \bar{x} \cos (\theta - \phi) + \bar{y} \sin(\theta - \phi) = p - a \cos(\theta) - b \sin (\theta)$$ Any insights appreciated.