Peter had some money. He spent 1/8 of it on a T-shirt and 3/4 of the remainder on a pair of shoes. After that, his parents gave him $715. The ratio of the total amount of money he had left at the end to the amount of money he had at first was 9:4. How much did Peter have at first?

Let X be the amount of money Peter had at first.

Peter spent X/8 on a T-shirt.
Peter had X - X/8 = 7/8*X left.
Peter spent 3/4 * (7/8*X) = 21/32 * X on shoes.
Peter had 7/8*X - 21/32*X = 9/32*X left.
9/32*X / X = 9/32 = (9/4) / (32/1) = 9/4 * 1/32 = 9/128
So 9/128*X = 715 and X = 128/9 * 715 = 10240. Answer: \boxed{10240}.

Let's assume the initial amount of money Peter had is represented by "x" dollars.

He spent 1/8 of it on a T-shirt, so the amount of money remaining is 7/8 * x.
Then he spent 3/4 of the remainder on a pair of shoes, so the amount of money remaining is 1/4 * 7/8 * x = 7/32 * x.
After his parents gave him $715, we can write the equation:
7/32 * x + 715 = 9/4 * (x)
To solve for x, we will simplify the equation:
7/32 * x + 715 = 9/4 * x
Multiplying both sides by 32 to eliminate the fractions:
7x + 22960 = 72x
Subtracting 7x from both sides:
22960 = 65x
Dividing both sides by 65:
x = 352
Therefore, Peter had $352 at first.