Both cases involve exponents, multiplication and division but will produce different results.
In the first case, the product is in the denominator so it's like adding parenthesis, 1 / (3x2). Here you will want to find out what 3x^2 is first by first squaring the value of x and then multiplying by 3 (exponents come before multiplication and division in PEMDAS). Then take that answer and do the division, 1 divided by that answer.
In the second case, you will want to find x2 first then you are left with division and multiplication which go in order from left to right. First divide 1/3 then multiply that by the value of x^2
Hope this helps :)