Any nine points lie on a cubic; the nine points in the question already lie on a cubic: namely, the degenerate cubic consisting of the union of the triangle's edge-lines. What the question intends is that the nine points, under the stated condition, lie on a second cubic (and therefore, determine an pencil of cubics). That is, whereas we expect nine points in "general position" to determine a unique cubic, the condition indicates that these particular nine points are in "not-quite-general position".
This can be proven with the approach I used in this answer to prove Carnot's Theorem for Conics. Namely, we assign coordinates
$$A := (x_A, y_A) \quad\quad B = (x_B, y_B) \quad\quad C := ( x_C, y_C )$$ and define
$$
A^{(i)} = \frac{B + a_i C}{1 + a_i} \qquad
B^{(i)} = \frac{C + b_i A}{1 + b_i} \qquad
C^{(i)} = \frac{A + c_i B}{1 + c_i} \qquad
$$
then, writing $P_x$ and $P_y$ for the coordinates of $P$, we use a determinant to express the equation of "the" cubic through our nine points:
$$\left|\begin{array}{ccccccccccc}
x^3 & x^2 y & x y^2 & y^3 & x^2 & x y & y^2 & x & y & 1 \\
(A^{\prime}_x)^3 &
(A^{\prime}_x)^2 A^{\prime}_y &
A^{\prime}_x (A^{\prime}_y)^2 &
(A^{\prime}_y)^3 &
(A^{\prime}_x)^2 &
A^{\prime}_x A^{\prime}_y &
(A^{\prime}_y)^2 &
A^{\prime}_x &
A^{\prime}_y & 1
\\
(A^{\prime\prime}_x)^3 &
(A^{\prime\prime}_x)^2 A^{\prime\prime}_y &
A^{\prime\prime}_x (A^{\prime\prime}_y)^2 &
(A^{\prime\prime}_y)^3 &
(A^{\prime\prime}_x)^2 &
A^{\prime\prime}_x A^{\prime\prime}_y &
(A^{\prime\prime}_y)^2 &
A^{\prime\prime}_x &
A^{\prime\prime}_y & 1
\\
(A^{\prime\prime\prime}_x)^3 &
(A^{\prime\prime\prime}_x)^2 A^{\prime\prime\prime}_y &
A^{\prime\prime\prime}_x (A^{\prime\prime\prime}_y)^2 &
(A^{\prime\prime\prime}_y)^3 &
(A^{\prime\prime\prime}_x)^2 &
A^{\prime\prime\prime}_x A^{\prime\prime\prime}_y &
(A^{\prime\prime\prime}_y)^2 &
A^{\prime\prime\prime}_x &
A^{\prime\prime\prime}_y & 1
\\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots
\\
(C^{\prime\prime\prime}_x)^3 &
(C^{\prime\prime\prime}_x)^2 A^{\prime\prime\prime}_y &
C^{\prime\prime\prime}_x (C^{\prime\prime\prime}_y)^2 &
(C^{\prime\prime\prime}_y)^3 &
(C^{\prime\prime\prime}_x)^2 &
C^{\prime\prime\prime}_x C^{\prime\prime\prime}_y &
(C^{\prime\prime\prime}_y)^2 &
C^{\prime\prime\prime}_x &
C^{\prime\prime\prime}_y & 1
\end{array}\right| = 0$$
A computer algebra system like Mathematica really helps to crunch the symbols, returning this:
$$\begin{align}
0 =
&\phantom{\cdot}\;\left( x ( y_A - y_B ) - y ( x_A - x_B ) + x_A y_B - y_A x_B \right) \\
&\cdot\left( x ( y_B - y_C ) - y ( x_B - x_C ) + x_B y_C - y_B x_C \right) \\
&\cdot\left( x ( y_C - y_A ) - y ( x_C - x_A ) + x_C y_A - y_C x_A \right) \\
&\cdot|\triangle ABC|^7 \\
&\cdot(a_1 - a_2) (a_2 - a_3) (a_3 - a_1)\\
&\cdot(b_1 - b_2) (b_2 - b_3) (b_3 - b_1)\\
&\cdot(c_1 - c_2) (c_2 - c_3) (c_3 - c_1)\\
&\cdot(1 + a_1 a_2 a_3 b_1 b_2 b_3 c_1 c_2 c_3)
\end{align}$$
(There must be a better way to derive this than by a brute-force calculation of a $10$-by-$10$ determinant. Of course, it helps to take convenient starting coordinates like $A=(0,0)$, $B = (x_B,0)$, $C = (x_C,y_C)$.)
The first three factors describe the triangle's edge-lines; their product represents the unique conic through our nine points, unless one of the other factors vanishes.
Of course, $|\triangle ABC| \neq 0$ for a non-degenerate triangle. Taking our points to be distinct guarantees that $a_i - a_j \neq 0$, and so forth. We may then draw the following conclusion:
Nine distinct points $A^{(i)}$, $B^{(i)}$, $C^{(i)}$ on the edge-lines of a non-degenerate triangle determine a pencil of cubics if and only if
$$a_1 \; a_2 \; a_3 \; b_1 \; b_2 \; b_3 \; c_1 \; c_2 \; c_3 \;=\; -1 \tag{$\star$}$$
Equivalently, we can say that those nine points determine a unique cubic (the union of the triangle's edge-lines) if and only if
$$a_1 \; a_2 \; a_3 \; b_1 \; b_2 \; b_3 \; c_1 \; c_2 \; c_3 \;\neq\; -1$$
To convert to the formula in the question, we note that the constants represent signed ratios of oriented segment lengths (in the grand Ceva tradition); a ratio is positive if the segments point in the same direction along a line, and negative if the segments point in opposite directions. Thus,
$$a_1 = \frac{|B A^{\prime}|}{|A^{\prime} C|} = - \frac{|A^{\prime} B|}{|A^{\prime}C|}$$
and so forth. An odd number of sign changes ensures that $(\star)$ matches the formula in the question. $\square$