simplify and evaluate where g=3

(2g-1)^2-2g+g^2