I assume you're trying to prove this identity for natural numbers n?
Let P(n) be the statement that
1² + 4² + 7² + … + (3n - 2)² = n (6n² - 3n - 1) / 2
We prove it by induction. First check that P(1) is true:
1² = 1
1 • (6•1² - 3•1 - 1) / 2 = 1 • 2 / 2 = 1
so P(1) is indeed true.
Assume P(k) is true, that
1² + 4² + 7² + … + (3k - 2)² = k (6k² - 3k - 1) / 2
We want to use this hypothesis to show that P(k + 1) is also true, that
1² + 4² + 7² + … + (3k - 2)² + (3 (k + 1) - 2)²
= (k + 1) (6 (k + 1)² - 3 (k + 1) - 1) / 2
= (k + 1) (6k² + 9k + 2) / 2
= (6k³ + 15k² + 11k + 2) / 2
By the induction hypothesis,
1² + 4² + 7² + … + (3k - 2)² + (3 (k + 1) - 2)²
= k (6k² - 3k - 1) / 2 + (3 (k + 1) - 2)²
= k (6k² - 3k - 1) / 2 + (3k + 1)²
= 3k³ + 15/2 k² + 11/2 k + 1
= (6k³ + 15 k² + 11 k + 2) / 2
which is exactly what we needed to show, so P(k + 1) is also true.
Thus P(n) is true for all natural numbers n.