Generate the context free grammar for the following language: $\left \{ a^{3n}b^{m}c^{n}|n>0, m>0\right \}$
Unfortunately your grammar generates only $\epsilon$ (which is not in the language, since $n$ and $m$ are greater than 0), as you don't delete the $A$; moreover you don't control that the number of $A$'s is thrice the numeber of $C$'s.
You can try something like this:
$S\rightarrow aaaS'c$
$S' \rightarrow aaaS'c | B$
$B\rightarrow Bb | b$