$$1+4+7+…+(3n-2) = \frac{n}{2}(3n-1)$$
Given identity is true For $n=1$
$$\frac{1\cdot(3-1)}{2}=1\tag{1}$$
Assume it's true for some integer $k$
$$1+4+7+…+(3k-2) = \frac{k}{2}(3k-1)\tag{2}$$
for $k+1$ .
We have to show that
$$1+4+7+…+(3k-2)+(3(k+1)-2) = \frac{k+1}{2}(3(k+1)-1)$$
$$1+4+7+…+(3k-2)+(3k+1) = \frac{k+1}{2}(3k+2)\tag{3}$$
Adding $(3k+1)$ to LHS and RHS of $(2)$
We get
$$\begin{align}
1+4+7+…+(3k-2)+(3k+1) & = \frac{k}{2}(3k-1)+(3k+1)\\
&= \frac{k(3k-1)+2(3k+1)}{2}\\
&= \frac{3k^2+5k+2}{2}\\
&= \frac{3k^2+3k+2k+2}{2}\\
1+4+7+…+(3k-2)+(3k+1) &= \frac{(3k+1)(k+2)}{2}\tag{4}\\
\end{align}$$
So, if our Identity is true for some integer $n=k$ Then it's also true for $n=k+1$, Since our identity is true for $n=1$ , Using principle of Mathematical Induction we can say that it's true for all $n\in\mathbb N$
Alternate
$$S=1+4+7+…+(3n-5)+(3n-2)\tag{1}$$
$$S=(3n-2)+(3n-5)+\cdots+7+4+1\tag{2}$$
By adding $1$ and $2$ We get,
$$2S=\underbrace{(3n-1)+(3n-1)+\cdots+(3n-1)+(3n-1)}_{\text{ n times }}=n(3n-1)$$
$$S=1+4+7+…+(3n-5)+(3n-2)=\frac{n}{2}(3n-1)$$