Sara earned money selling pies and cakes. For the cakes, she made a profit of $200 with an expense of $4 per cake. For the pies, she made a profit of $250 with an expense of $5 per pie. She sold the same number of cakes and pies. How many pies did Sara sell if she earned the same total profit for pies and cakes? Write an equation and then solve for x.