There are two steps in any question of this nature: (1) find a useful way to characterize the event and (2) compute the probability of this event (in general, by integrating a probability density over it). When the probability is uniform, the integral is proportional to the area of the event.
I wish to emphasize the technique. It includes
Drawing a picture of the event to keep focused on the key ideas.
Minimizing the calculations performed.
Delaying calculation as much as possible until the end, in the hope of simplification along the way.
1. Find a useful characterization of the event.
You need to relate the roots $x_1, x_2$ to the coefficients $p$ and $q$. That is done by comparing coefficients in the expansion
$$x^2 - (x_1+x_2) x + x_1 x_2 = (x-x_1)(x-x_2) = x^2 + px + q,$$
whence
$$p=-(x_1+x_2).\tag{1}$$
By completing the square you can establish a criterion for both roots to be real:
$$x^2 + px + q = (x - p/2)^2 + q - p^2/4 = \frac{4q - p^2}{4}.$$
This is zero if and only if
$$(x-p/2)^2 = \frac{p^2 - 4q}{4}.\tag{2}$$
Since the left hand side, which is a square of a real number when the roots are real, is non-negative, and all non-negative numbers have real square roots, both roots are real if and only if the right hand side is non-negative. Equivalently, its numerator must be non-negative.
We can now characterize the event of the problem in directly in terms of $p$ and $q$:
From $(2)$, both roots are real if and only if $p^2 - 4q \ge 0$.
From $(1)$, their sum $x_1+x_2$ is less than $1$ if and only if $-p = x_1+x_2 \lt 1$; more simply, $p \gt -1$.
Here is the graph of the set determined by (1) and (2). It is the blue region, including all portions of its boundary except a vertical line segment along the left side.
2. Find the probability of the event.
In this figure, which uses $(p,q)$ for coordinates, the probability is uniform. That means the probability of any event is its relative area. The total area of the square is $4$, while the area of the event itself is the area between the parabola $q = p^2/4$ and the line $q=-1$, from $p=-1$ to $p=1$. This area is
$$A = \int_{-1}^1 (p^2/4 - (-1)) dp = \frac{1}{4}\int_{-1}^1 p^2 dp + \int_{-1}^1 dp = \frac{1}{4}\left(\frac{p^3}{3}\big|_{-1}^1\right) + p\big|_{-1}^1=\frac{1}{6}+2.$$
Therefore the probability is
$$\Pr\left(x_1,x_2\in\mathbb{R},\ x_1+x_2\lt 1\right) = \Pr\left(p^2-4q \ge 0,\ -p \lt 1\right) = \frac{A}{4}=\frac{\frac{1}{6} + 2}{4} = \frac{13}{24}.$$
This value, which is slightly greater than $12/24=1/2$, is consistent with the visual impression from the picture that the blue area slightly exceeds $1/2$.
Incidentally, one mistake in the posted solution occurred at the very last line: the lower limit of integration over $q$ should be $-1$ rather than $0$. Drawing the picture makes this obvious. That solution contains several other mistakes, of which the most important is the misquoting of the Quadratic Formula: the expressions for the roots are wrong. They need to be divided by $2$.