well, lemme post a quick on how a perfect square trinomial works
![\bf \begin{array}{cccccllllll} a^2& + &2 a b&+& b^2\\\downarrow && &&\downarrow \\ a&& && b\\&\to &( a + b)^2&\leftarrow \end{array}\qquad \qquad \begin{array}{cccccllllll} a^2& - &2 a b&+& b^2\\\downarrow && &&\downarrow \\ a&& && b\\&\to &( a - b)^2&\leftarrow \end{array}]()
as you should already know, now let's look at this equation, and let's start by grouping the variables,
g(n) = n² - 6n + 16
g(n) = (n² - 6n) + 16
g(n) = (n² - 6n + [?]²) + 16
so, we have a missing fellow there, in order to get a perfect square trinomial, well, the tell-tale guy is the middle term, the middle term is the product of 2 and the other two guys without the ², and we know in this case is 6n.
![\bf \stackrel{\stackrel{middle}{term}}{6n}=2(n)[?]\implies \cfrac{6n}{2n}=[?]\implies 3=[?]](https://img.qammunity.org/2019/formulas/mathematics/college/f1yifqx9yj74x045nmq4lr5xiwlps7xskq.png)
aha!!, there's our missing fellow, is 3.
well, let's keep in mind that all we're doing is borrowing from our very good friend Mr. Zero, 0, so if we add 3², we also have to subtract 3².
![\bf g(n)=(n^2-6n+3^2-3^2)+16\implies g(n)=(n^2-6n+3^2)+16-3^2\\\\\\g(n)=(n-3)^2+16-9\implies \boxed{g(n)=(n-3)^2+7}\\\\\\~~~~~~\textit{parabola vertex form}\\\\y=a(x- h)^2+ k\qquad\qquadvertex~~(\stackrel{}{ h},\stackrel{}{ k})\\\\\\g(n)=\stackrel{a}{1}(n-\stackrel{h}{3})+\stackrel{k}{7}\qquad vertex~(3,7)](https://img.qammunity.org/2019/formulas/mathematics/college/msae6kle22qkt2v63w1mtwie6w8o66r79r.png)
is it a maximum of a minimum? well, all we have to do is look at the leading term's sign, n² has a positive coefficient, that means the parabola is opening upwards, assuming "n" is drawn on the x-axis, and since it's opening upwards like a cup, it comes down down down, reaches a minimum and goes back up up up.
well, the axis of symmetry will just be the x-coordinate of the vertex, that is the line that will cut the parabola in two twin halves, namely x = 3.