John had $150 and Ali had $130. They each bought a shirt at the same price. In the end, the amount of money John and All had left, was in the ratio 6:5. How much did the shirt cost?

cost of shirt --- x

150-x : 130-x = 6:5
(150-x)/(130-x) = 6/5
750 - 5x = 780 - 6x
x =30