You're on the right track, you just need a 2nd equation because you do have two variables to solve for. The total amount of pennies is 10, so you can also say x+y=10.

Now you either use y=10-x or x=10-y to make a substitution into the 1st equation and solve for them both.