<s>[INST] Increasing the number of sides of a polygon by $k$ increases the number of diagonals by $6k$ For reference:

In a certain polygon when increasing the number of sides in $k$, the number of diagonals increases by $6k$. How many polygons meet this condition? (Answer: $5$)

My progress:
$\frac{n(n-3)}{2}+ 6k = \frac{(n+k)(n+k-3)}{2}\rightarrow\\
{\frac{n^2}{2}}-{\frac{3n}{2}}+6k = \frac{k^2}{2}+kn-\frac{3k}{2}+{\frac{n^2}{2}}-{\frac{3n}{2}}\rightarrow\\
\frac{k^2}{2}+kn-\frac{15k}{2}\rightarrow{k = 0} ~or ~k =15 -2n \implies n = \frac{15-k}{2}\\
n \ is \ integer \geq3 \therefore n={7, 6, 5, 4, 3}\rightarrow 5~polygons$
Is my resolution correct?
 [/INST] $\frac{n(n-3)}{2}+ 6k = \frac{(n+k)(n+k-3)}{2}\rightarrow\\
{\frac{n^2}{2}}-{\frac{3n}{2}}+6k = \frac{k^2}{2}+kn-\frac{3k}{2}+{\frac{n^2}{2}}-{\frac{3n}{2}}\rightarrow\\
\frac{k^2}{2}+kn-\frac{15k}{2}\rightarrow{k = 0} ~or ~k =15 -2n \implies n = \frac{15-k}{2}\\
n \ is \ integer \geq3 \therefore n={7, 6, 5, 4, 3}\rightarrow 5~polygons$
</s>