Write and solve: Three times the difference of a number and five is nine.