Disclaimer: This answer will probably not satisfy your problem at 100%, since I'm not actually using every data you gave to come to the result (see last paragraph). Yet, I'm posting this since your question got no reaction for 7 days, this can help you getting to the right and thorough reasonment to solve your problem. If I misunderstood something, please tell me in the comments.
First, I want to be sure I understood your problem accurately:
\begin{array}{ll}
(p_1(x)u_1^\prime(x))^\prime+u_1(x)=f(x) && x\in (a,b)\\
u_1(x)=g(x) && x\in \{a,b\} \\
\end{array}
This isn't the general for of a Sturm-Liouville problem, which is:
$$(p(x)u'(x))'+q(x)u(x)=-\lambda r(x)y(x)$$
I'm not sure to understand what you mean by "$x \in (a, b)$ " and "$x\in \{a, b\}$". As far as I know, intervals are usually noted $[a, b]$, and $x\in \{a, b\}$ means that $x=a$ or $x=b$.
Then, you didn't indicate the nature of your variables. I imagine you are only working in $\mathbb R$ ? I'll assume this for what follows.
Let's fix $w_2(x) := -u_2(x)$. Using the triangle inequality:
$$|u_1+w_2|^2 \le |u_1|^2 + |w_2|^2$$
So, as your norms are positive by definition:
$$\int_a^b |u_1(x)+w_2(x)|^2+|u^\prime_1(x)+w^\prime_2(x)|^2dx \le \int_a^b |u_1|^2 + |w_2|^2+|u'_1|^2 + |w'_2|^2dx$$
$$= \int_a^b |u_1|^2 + |u'_1|^2dx +\int_a^b|w_2|^2 + |w'_2|^2dx$$
By definition of $|x|$, $|-x| = |x|$, so:
$$= \int_a^b |u_1|^2 + |u'_1|^2dx +\int_a^b|u_2|^2 + |u'_2|^2dx \le C_1 + C_2$$
Thus:
$$\int_a^b |u_1(x)-u_2(x)|^2+|u^\prime_1(x)-u^\prime_2(x)|^2dx \le C_1 + C_2 =: C_3$$
And you can easily find a value of $C$ such as $C_3 = C||p_1 - p_2||_\infty^2$.
I didn'y use:
- The fact that $u_1, u_2$ are solutions of a Sturm-Liouville problem
- The infinite norm $||\ ||_\infty$
Update: The comments indicated that $(a, b)$ was the open interval $]a, b[$. Moreover, we need to find $\tilde C_3$ such as $C_3(p) = \tilde C_3(p_0)$, since the constant given by the hint actually depends on $p(x)$. In order to do that, we may use the information I hadn't taken into account.