Peter and Tom had a total of $950. After Peter saved another $250 and Tom spent 2/5 of his money, both of them had the same amount of money. How much did Peter had at first?

p+250 = 3/5 (950-p)