The cost of a magazine is $x and the cost of a newspaper is $(x -3). The total cost of 6 magazines and 9 newspapers is $51. Write down and solve an equation in x to find the cost of a magazine,