A man went to a post office to buy some stamps. If he bought x, 50 cents stamps and y, 25 cents stamps, the total cost would have been $3.50. If, however, he bought twice as many 50 cents stamps and half as many 25 cents stamps, then the total cost would have been $4.75. Evaluate x and y.