Hocking and Young do not claim that components and quasicomponents coincide in a locally compact Hausdorff space. They state the weaker
Theorem 2-57: In a locally compact Hausdorff space, every compact quasicomponent is a component, and every compact component is a quasicomponent.
In other words, a compact subset of a locally compact Hausdorff space is a component if and only if it is a quasicomponent.
We shall prove the above theorem. However, the answer to your question (which does not make compactness assumptions on the subspaces under consideration) is "no". There is an explicit counterexample on p.46 of Hocking and Young's book which is presented below.
Let us begin by some remarks concerning the concept "quasicomponent". Hocking and Young define a quasicomponent of a space $X$ as a subset $Q \subset X$ such that
$Q$ is "inseparable rel. $X$" saying that for each separation $(A,B)$ of $X$ [which means that $A,B$ are open and disjoint and $X = A \cup B$], $Q$ lies in either $A$ or $B$.
$Q$ is not a proper subset of any other $Q'$ which is inseparable rel. $X$.
Property 1. can obviously be reformulated as follows: For each clopen $A \subset X$, either $Q \subset A$ or $Q \cap A = \emptyset$. Or, in other words: For each clopen $A \subset X$, if $Q \cap A \ne \emptyset$, then $Q \subset A$.
However, there is a more standard definition: For $x,y \in X$ define $x \sim y$ if $\{x,y\}$ is inseparable rel. $X$. It is easily seen that this is an equivalence relation. Then a quasicomponent is defined as an equivalence class with respect to $\sim$. It is clear that these quasicomponents form of partition of $X$ into pairwise disjoint sets.
It is easy to see that the quasicomponent $Q(x) = Q(x;X)$ of a point $x \in X$ in the equivalence class sense is the intersection of all clopen subsets containing $x$. In particular $Q(x)$ is closed.
Let us verify that both definitions agree.
For $x \in X$ let $\mathcal A(x) = \mathcal A(x;X)$ denote the set of clopen subsets of $X$ containing $x$ and $Q(x) = \bigcap_{A \in \mathcal A(x)} A$.
(1) $Q(x)$ is a quasicomponent in the sense of Hocking and Young.
a) $Q(x)$ is inseparable rel. $X$: Let $A$ be clopen such that $Q(x) \cap A \ne \emptyset$. Assume $x \notin A$. Then $x \in B = X \setminus A$, thus $B \in \mathcal A(x)$ and we conclude $Q(x) \subset B$ which means that $Q(x) \cap A = \emptyset$, a contradiction. Thus $x \in A$, hence $Q(x) \subset A$.
b) $Q(x)$ satisfies 2.: Let $Q \supset Q(x)$ satisfy 1. Then for all $A \in \mathcal A(x)$ we have $Q \cap A \ne \emptyset$, hence $Q \subset A$. Therefore $Q \subset Q(x)$, i.e. $Q = Q(x)$.
(2) Let $Q$ be a quasicomponent in the sense of Hocking and Young and $x \in Q$. Then $Q = Q(x)$.
For all $A \in \mathcal A(x)$ we have $Q \cap A \ne \emptyset$, thus $Q \subset A$. Hence $Q \subset Q(x)$. From (1) we know that $Q(x)$ is inseparable rel. $X$. By property 2. we see that $Q = Q(x)$.
Let us note that if $C$ is a connected subset of $X$ and $A$ a clopen subset of $X$ such that $C \cap A \ne \emptyset$, then trivially $C \subset A$. This shows that the component of $x \in X$ is contained in $Q(x)$. The latter implies that each connected quasicomponent is a component.
Let $x \in X' \subset X$. Then $\mathcal A(x;X')$ contains all $A \cap X'$ with $A \in \mathcal A(x;X)$ and we conclude $Q(x;X') = \bigcap_{A' \in \mathcal A(x;X')} A' \subset \bigcap_{A \in \mathcal A(x;X)} (A \cap X') = Q(x;X) \cap X' \subset Q(x;X)$.
Now let us come to the counterexample.
Let $E = \{0\} \cup \{1/n \mid n \in \mathbb N \} \subset \mathbb R$ and $X= ([0,1] \times E) \setminus \{(1/2,0)\} \subset \mathbb R^2$. This is a locally compact separable metrizable space. Then $X_0 = [0,1/2) \times \{0\} \cup (1/2,1] \times \{0\}$ is a (non-compact) quasicomponent of $X$ which contains the two (non-compact) components $X'_0 = [0,1/2) \times \{0\}, X''_0 = (1/2,1] \times \{0\}$ of $X$.
Let $x = (0,0) \in X$ and $A$ be clopen in $X$ with $x \in A$. Then there exists $n_0$ such that $A$ contains the points $x_n = (0,1/n)$ for $n \ge n_0$. Hence it also contains the sets $X_n = [0,1] \times \{1/n\}$ for $n \ge n_0$ because the $X_n$ are connected. But $A$ is closed in $X$, thus $A$ must contain $X_0$. Thus $X_0 \subset Q(x)$. Moreover, the sets $A_m = X_0 \cup [0,1] \times \{1/n \mid n \ge m \}$, $m \in N$, are clopen. Thus $Q(x) \subset \bigcap_{m=1}^\infty A_m = X_0$.
We finally prove Hocking and Young's Theorem 2-57. We invoke that components and quasicomponents of compact Hausdorff spaces agree.
Let $K \subset X$ be compact and $L \subset X$ be a compact neigborhood of $K$ in $X$. Note that $U = \text{int}(L)$ is an open neigborhood of $K$ in $X$.
(1) If $K$ is a quasicomponent of $L$, then it is a quasicomponent of $X$.
Let $x \in K$. Then $K = Q(x;L) = \bigcap_{A' \in \mathcal{A}(x;L)} A'$. Now $B = L \setminus U$ is compact and $B \subset L \setminus K = L \setminus \bigcap_{A' \in \mathcal{A}(x;L)} A' = \bigcup_{A' \in \mathcal{A}(x;L)} (L \setminus A')$. Since the $L \setminus A'$ are open in $L$, there are finitely many $A'_k \in \mathcal{A}(x;L)$ such that $L \setminus U = B \subset \bigcup_k(L \setminus A'_k) = L \setminus \bigcap_k A'_k$, thus $A_* = \bigcap_k A'_k \subset U$. But $A_*$ is clopen in $L$, thus also all $A'_* = A_* \cap A'$ with $A' \in \mathcal{A}(x;L)$ are clopen in $L$ and clearly $K = \bigcap_{A' \in \mathcal{A}(x;L)} A'_*$. The $A'_*$ are compact, open in $L$, contained in $U$, thus open in $U$ and open in $X$. Hence they are clopen in $X$ and contain $x$. This shows that $Q(x;X) \subset K = Q(x;L)$. Since trivially $Q(x;L) \subset Q(x;X)$, we are done.
(2) If $K$ is a component of $X$, then it is a quasicomponent of $X$.
Clearly $K$ is a component of $L$, hence a quasicomponent of $L$ and (1) applies.
(3) If $K$ is a quasicomponent of $X$, then it is a quasicomponent of $L$.
Let $x \in K$. Then trivially $K' = Q(x;L) \subset Q(x;X) = K$. The set $K'$ is compact and $L$ is a compact neigborhood of $K'$. Thus (1) applies to show that $K'$ is a quasicomponent of $X$. But this implies $K' = K$.
(4) If $K$ is a quasicomponent of $X$, then it is a component of $X$.
By (3) $K$ is a quasicomponent of $L$, hence a component of $L$ and thus a connected quasicomponent of $X$. This means that $K$ is a component of $X$.
Best Answer
For a simpler example, note that $\{0,1,\frac{1}{2},\frac{1}{3},\frac{1}{4}\ldots\}$ (with its natural topology as a subspace of $\Bbb{R}$ is compact, Hausdorff, and has $\aleph_0$ components.