If 3^x= n, express 3x+2 in terms of n.