What is the difference between y = 1/3^2

and y = (1/3)^2?

No difference.

1 / 3 ^ 2 = 1 / 9

( 1 / 3 ) ^ 2 = ( 1 / 3 ) * ( 1 / 3 ) = 1 / 9