The output of a function is 9 less than 3 times the input. Write an equation for the function and then find the input when the output is –6.