Prove that $A_0$ and $B_0$ are separated subsets of $\mathbb{R}$; Exercise 21 Chapter 2, Baby Rudin (Exercise 21 Chapter 2, Baby Rudin) I am trying to prove

Let $A$ and $B$ be separated subsets of some $\mathbb{R}^k$, suppose $\textbf{a} \in A$, $\textbf{b} \in B$ and define $\textbf{p}(t) = (1-t)\textbf{a} + t\textbf{b}$, for $t \in \mathbb{R}$. Put $A_0 = \textbf{p}^{-1}(A), B_0 = \textbf{p}^{-1}(B)$. [Thus, $t \in A_o$ iff $\textbf{p}(t) \in A$.]


Prove that $A_0$ and $B_0$ are separated subsets of $\mathbb{R}$.
My attempt so far:


a. Assume to the contrary that $\exists y$ such that $y \in A_0 \cap \overline{B_0}$ which implies $y \in A_0$ and $y \in \overline{B_0}$. Then, $\textbf{p}(y) \in A$ and either $y \in B_0$ or $y$ is a limit point of $B_0$. If $y \in B_0$, then $\textbf{p}(y) \in B$ which would contradict that $A$ and $B$ are separated. If $y$ is a limit point of $B_0$, ...

My question: I am having trouble completing the proof. Can someone please suggest how this proof can be completed?
P.S. I found this proof but I have no idea why the idea of continuity was introduced in the first place, or even how one knows that $p$ is continuous, as the answer claims. I would like to complete this proof without using the concept of continuity, ideally, since Rudin hasn't introduced the concept of continuity so far (till Chapter 2).
Edit: We now claim that $\mathbf{p}(t)$ is continuous on all of $\mathbb{R}$.
Proof: Let $\epsilon > 0$ and $c \in \mathbb{R}$. Suppose $\left|t-c\right| < \delta$ where $\delta = \frac{\epsilon}{\left|b-a\right|} > 0$. Then, we have
$$\left|\mathbf{p}(t)-\mathbf{p}(c)\right| =  \left|(1-t)\mathbf{a} + t\mathbf{b}-\mathbf{a}(1-c)-c\mathbf{b}\right| = (t-c)\left|\mathbf{b}-\mathbf{a}\right| < \frac{\epsilon}{\left|\mathbf{b}-\mathbf{a}\right|} \cdot \left|\mathbf{b}-\mathbf{a}\right| = \epsilon$$ and we are done.
Definition of a continuous function:

Suppose $X, Y$ are metric spaces, $E \subset X, p \in E$ and $f$ maps $E$ into $Y$. Then, $f$ is said to be continuous at $p$ if for every $\epsilon > 0, \exists \delta > 0$ such that $d_Y(f(x), f(p))< \epsilon$ for all points $x \in E$ for which $d_X(x, p) < \delta$

Definition of a closed set:

$E$ is closed if every limit point of $E$ is a point of $E$.

Definition of closure of a set (denoted by $\bar{E}$):

$\bar{E} = E \cup E'$ where $E'$ is the set of limit points of $E$.

Definition of a limit point

A point $p$ is a limit point of a set $E$ if every neighborhood of $p$ contains a point $q \neq p$ such that $q \in E$.

 A: Ok, here we go: this is a general proof of the following:
If $p:X\to Y$ is a continuous function and $S\subseteq Y$ is a subset, then $\overline{p^{-1}(S)} \subseteq p^{-1}\left (\overline S \right )$.
Proof: Assume that $x \in \overline{p^{-1}(S)}$. If $x\in p^{-1}(S)$, then clearly we are done since $S\subset \overline S$. If $x\not\in p^{-1}(S)$, then $x$ is a limit point of $p^{-1}(S)$. Consider $p(x)$. We want to show $p(x) \in \overline S$, then we need to show in this case that $p(x)$ is a limit point of $S$. Consider a neighborhood $B(p(x), \epsilon)$, for $\epsilon >0$. By continuity, there exists a $\delta >0$ such that if $d(x,z) < \delta$, then $d(p(x), p(z)) < \epsilon$ (I omit the decoration on the metrics for readability, do not assume the metrics are the same). Now, $x$ is a limit point of $p^{-1}(S)$, and $B(x,\delta)$ is a neighborhood of $x$, therefore, by definition there exists $q\in B(x,\delta)\cap p^{-1}(S)$. It follows that $d(p(q),p(x)) < \epsilon$, and $p(q) \in S$. We have now shown that $p(x)$ is a limit point of $S$. This completes the proof of $\overline{p^{-1}(S)} \subseteq p^{-1}\left (\overline S \right )$.
Applying this to your specific function, we conclude: $\overline{A_0}\cap B_0 = \overline{p^{-1}(A)}\cap B_0 \subseteq p^{-1}\left (\overline A \right )\cap B_0 = p^{-1}\left (\overline A \cap B \right )= \emptyset$, and by symmetry we get the corresponding inequality by switching the roles of $A$ and $B$.
Here is my counterexample for equality:
Let $k=2$ and define $A = \{(-1,0)\}\cup \{0\}\times (0,1]$, and $B = \{(1,0)\}$, then let $\textbf a = (-1,0)$ and $\textbf b = (1,0)$. If we define $p:\mathbb R \to \mathbb R^2$ by $p(t) = (1-t)\textbf a + t\textbf b$, then you can verify that $p^{-1}(A) = \{0\}$, which is closed, so $\overline{p^{-1}(A)}= \{0\}$, but $A' =\{(0,0)\}$, so $p^{-1}(\overline A) = \{0, 1/2\}$. Thus, the inclusion $\overline{p^{-1}(A)} \subseteq p^{-1}\left (\overline A \right )$ is strict in this case.
A: This is a response to a query by the proposer in a comment to the A from @WilliamElliot.
Sets $A,B$ are separated iff  $A\cap \bar B=B\cap \bar A=\phi.$ Sets $A,B$ are completely separated iff there exist disjoint open $U,V$ with $A\subseteq U$ and $B\subseteq V.$
If $(X,d)$ is a metric space and $A, B$ are separated subsets of $X$ then $A, B$ are completely separated.
PROOF: For each $a\in A$ take $r_a\in \Bbb R^+$ such that $B\cap B_d(a,r_a)=\phi.$ For each $b\in B$ take $s_b\in \Bbb R^+$ such that $A\cap B_d(b,s_b)=\phi.$
Let $U=\cup_{a\in A}B_d(a,r_a/2)$ and $V=\cup_{b\in B}B_d(b,s_b/2).$
To show $U\cap V=\phi,$ suppose instead that $c\in U\cap V.$ Take $a\in A$ such that $c\in B_d(a,r_a/2).$ Take $b\in B$ such that $c\in B_d(b,s_b/2).$ Then $$d(a,b)\le d(a,c)+d(c,b)<r_a/2+s_b/2\le \max \{r_a,s_b\}=^{def}K\in \{r_a,s_b\}.$$
If $K=r_a$ then $d(a,b)<K=r_a,$ contrary to the def'n of $r_a.$
If $K=s_b$ then $d(b,a)<K=s_b,$ contrary to the def'n of $s_b.$
So $c\in U\cap V$ cannot exist.
A: Since $A$ and $B$ are seperated, there exist open disjoint $U,V$ with $A \subset U, B \subset V$.
$A_0 \subset K = p^{-1}(U), B_0 \subset L = p^{-1}(V)$.
Show $K$ and $L$ are open and disjoint.
