Find a formula for a function whose graph is obtained from by shifting right 3 units, vertically stretching by a factor of 3, and shifting down 7 units.