JohnHoltz's answer is correct in that you determine $C_1$ and $C_2$ by looking at the boundary conditions. Looking at the left-hand side of the beam, we know that the cantilever has zero shear and bending moment, which let's us determine (note the use of the auxiliary variable $w$ which describes the load's variation per unit length):
$$\begin{align}
w &= \dfrac{w_0}{L} \\
Q &= \int q\text{ d}x \\
&= \int wx\text{ d}x\\
&=\dfrac{1}{2}w x^2 + C_1 \\
Q(0) &= C_1 = 0 \\
\therefore Q &=\dfrac{1}{2}w x^2 \\
M &= \int Q\text{ d}x \\
&= \int \dfrac{1}{2}w x^2\text{ d}x \\
&= \dfrac{1}{6}w x^3 + C_2 \\
M(0) &= C_2 = 0 \\
\therefore M &= \dfrac{1}{6}w x^3 \\
\end{align}$$
As mentioned by Mark's answer, however, this only describes the beam from the left cantilever until the support. The discontinuity caused by the support means the equations are no longer valid and must be recalculated.
You can use Mark's heaviside function, or you can just repeat the process above for the other side as well.
Let's start by pretending that we only have the right-hand side, so that $x=0$ is at point C, and therefore define a new length $\ell$ which describes this cantilever, and $w_c$ as the value of the distributed load at point C.
$$\begin{align}
\ell &= \dfrac{L}{3} \\
w_c &= \dfrac{2}{3}w_0 \\
Q &= \int q\text{ d}x \\
&= \int \left(wx + w_c\right)\text{ d}x\\
&=\dfrac{1}{2}wx^2 + w_c x + C_1 \\
Q(\ell) &= \dfrac{1}{2}w\ell^2 + w_c \ell + C_1 = 0 \\
\therefore C_1 &= -\dfrac{1}{2}w\ell^2 - w_c \ell \\
&= -\dfrac{1}{18}w_0 L - \dfrac{2}{9}w_0 L \\
&= -\dfrac{5}{18}w_0 L \\
\therefore Q &=\dfrac{1}{2}wx^2 + \dfrac{2}{3}w_0 x -\dfrac{5}{18}w_0 L \\
M &= \int Q\text{ d}x \\
&= \int \left(\dfrac{1}{2}wx^2 + \dfrac{2}{3}w_0 x -\dfrac{5}{18}w_0 L\right)\text{ d}x \\
&= \dfrac{1}{6}wx^3 + \dfrac{1}{3}w_0 x^2 -\dfrac{5}{18}w_0 Lx + C_2 \\
M(\ell) &= \dfrac{1}{6}w\ell^3 + \dfrac{1}{3}w_0 \ell^2 - \dfrac{5}{18}w_0 L\ell + C_2 = 0 \\
\therefore C_2 &= -\dfrac{1}{6}w\ell^3 - \dfrac{1}{3}w_0 \ell^2 + \dfrac{5}{18}w_0 L\ell \\
&= \dfrac{1}{162}w_0 L^2 + \dfrac{1}{27}w_0 L^2 -\dfrac{5}{54}w_0 L^2 \\
&= -\dfrac{4}{81}w_0 L^2 \\
\therefore M &= \dfrac{1}{6}wx^3 + \dfrac{1}{3}w_0 x^2 -\dfrac{5}{18}w_0 Lx - \dfrac{4}{81}w_0 L^2 \\
\end{align}$$
Now that we have these values, we just need to shift the origin back to $x=0$ at point A to keep these results compatible with what we got for the left cantilever, so we get:
$$\begin{align}
Q &=\dfrac{1}{2}w\left(x-\dfrac{2}{3}L\right)^2 + \dfrac{2}{3}w_0\left(x-\dfrac{2}{3}L\right) -\dfrac{5}{18}w_0 L \\
M &= \dfrac{1}{6}w\left(x-\dfrac{2}{3}L\right)^3 + \dfrac{1}{3}w_0 \left(x-\dfrac{2}{3}L\right)^2 -\dfrac{5}{18}w_0 L\left(x-\dfrac{2}{3}L\right) - \dfrac{4}{81}w_0 L^2
\end{align}$$