Consider the spaces shown in the following pictures. The one on the left is the unit circle union with a line segment, and the one on the right is the same but with the point $(2,0)$ removed from the line segment.
I am trying to find the fundamental group of these two spaces using deformation retracts. Any hints please?

In both cases you get the unit circle $S^1$ as a strong deformation retract. In fact, $S^1$ is a strong deformation retract of $\mathbb R^2 \setminus \{0\}$ via $$H : (\mathbb R^2 \setminus \{0\}) \times [0,1] \to \mathbb R^2 \setminus \{0\}, H(x,t) = (1-t)x + t \frac{x}{\lVert x \rVert} .$$ Restricting $H$ to each of your spaces $X_i$ gives homotopies taking place inside $X_i$ which shows that $S^1$ is a strong deformation retract of $X_i$.
Thus the fundamental group of both spaces is $\mathbb Z$.