Mapping With Coordinates Systems
Suppose you have an robotic arm with 3 links:

Using generalized coordinates:
$\hspace{2.5em}$ $\vec{q}$ = $[q_{1}\hspace{1em}q_{2}]^{T}$ $\hspace{1.5em}$ [Generalized coordinate]
We can evaluate the system as following:

The kinematic equation that maps the origin to point A is:
$\hspace{5.em}$ $_{o}\vec{r}_{OA}$ = $_{o}\vec{r}_{O1}$ + $_{o}\vec{r}_{12}$ + $_{o}\vec{r}_{2A}$ $\hspace{1.5em}$ [kinematic equation]
We have two rotations over joint 1 and 2. Substituting in the equation above:
$\hspace{5.em}$ $_{o}\vec{r}_{OA}$ = $_{0}\vec{r}_{O1}$ + $R{(q_{1})_{01}}$ $ _{1}\vec{r}_{12}$ + $R{(q_{1}+q_{2})_{12}}$ $ _{2}\vec{r}_{2A}$
Where $R(\bullet)$ is the rotation matrix.
If you want to map between point 1 to A:
$\hspace{5.em}$ $_{1}\vec{r}_{1A}$ = $_{1}\vec{r}_{12}$ + $_{1}\vec{r}_{2A}$ $\hspace{1.5em}$ [New kinematic equation]
$\hspace{5.em}$ $_{1}\vec{r}_{1A}$ = $R{(q_{1})_{01}}$ $ _{1}\vec{r}_{12}$ + $R{(q_{1}+q_{2})_{12}}$ $ _{2}\vec{r}_{2A}$
It's pretty straightforward! For more on direct kinematics here.
The term $R{(q_{1})_{01}}$ $ _{1}\vec{r}_{12}$ should be something like:
$\hspace{5.em}$ $R{(q_{1})_{01}}$ $ _{1}\vec{r}_{12}$ = $\begin{bmatrix} cos(q_{1}) & -sin(q_{1}) & 0 \\ sin(q_{1}) & cos(q_{1}) & 0 \\ 0 & 0 & 1\end{bmatrix}$ $\begin{bmatrix} l_{1} \\ 0 \\ 0 \end{bmatrix}$
With a little bit of algebra, you can achieve the answer:
$\hspace{5.em}$ $ _{0}\vec{r}_{OA}$ = $\begin{bmatrix} l_{0} + l_{1}cos(q_{1}) + l_{2}cos(q_{1}+q_{2}) \\ 0 + l_{1}sin(q_{1}) + l_{2}sin(q_{1}+q_{2}) \\ 0 \end{bmatrix}$
That equation make possible to map all your system at any time relative to the origin.