Answer
Prove that $p(1)$ is true.
Prove that $p(k)$ true implies $p(k+1)$ true.
Work Step by Step
Let's note by $p(n)$ the property we want to prove:
$$p(n):\text{ } 1+4+7+\cdots+(3n-2)=\dfrac{n(3n-1)}{2}.$$
$\textbf{Step 1:}$ Prove $p(1)$ is true.
Set $n=1$ on each side and check if the property is verified:
$$\begin{align*}
3(1)-2&\stackrel{?}{=}\dfrac{1(3(1)-1)}{2}\\
1&=1\checkmark.
\end{align*}$$
Therefore $p(1)$ is true.
$\textbf{Step 2:}$ Prove that if $p(k)$ is true, then $p(k+1)$ is true.
We assumed $p(k)$ is true:
$$p(k):\text{ } 1+4+7+\cdots+(3k-2)=\dfrac{k(3k-1)}{2}.\tag1$$
We have to prove:
$$p(k+1):\text{ } 1+4+7+\cdots+(3k-2)+(3(k+1)-2)=\dfrac{(k+1)(3(k+1)-1)}{2}.$$
$$p(k+1):\text{ } 1+4+7+\cdots+(3k-2)+(3k+1)=\dfrac{(k+1)(3k+2)}{2}.\tag2$$
In Eq. $(1)$ add the term $(3k+1)$ on each side:
$$\begin{align*}
1+4+7+\cdots+(3k-2)+(3k+1)&=\dfrac{k(3k-1)}{2}+(3k+1)\\
1+4+7+\cdots+(3k-2)+(3k+1)&=\dfrac{3k^2-k+6k+2}{2}\\
1+4+7+\cdots+(3k-2)+(3k+1)&=\dfrac{3k^2+5k+2}{2}\\
1+4+7+\cdots+(3k-2)+(3k+1)&=\dfrac{(k+1)(3k+2)}{2}.
\end{align*}$$
We got Eq. $(2)$, therefore if $p(k)$ is true, then $p(k+1)$ is also true.
Both steps being proved, the given formula is true for any natural number $n$.