Ava bought four bags of candy for a total of $10.78. If two of the bags of candy together cost $4.17, and each of the other two bags had the same cost, how much was each remaining bag?

4.17 + 2x = 10.78

solve for x.