if f is a function, then f(3x)=3f(x)
This is false. The f(3x) means you are multiplying the input 'x' by 3 before plugging into the equation. 3f(x) means you are going to multiply your answer (output) by 3 after you've plugged the input value in and gotten the output.