Separate 38 into two parts such that 3 times the smaller is 16 less than twice the larger. Find the two numbers.

A purse contains 19 coins worth $3.4. If the purse contains only dimes and quarters. How many of each coin are in the purse?

If the smaller is x and the larger is y, then

3x = 2y-16
now we have
x + (3x+16)/2 = 38

d+q = 19
10d+25q = 340