John has 18 coins worth $1.25. Some are nickels and dimes. How many of each does he have?

X nickels.

(18-X) dimes.

5x + 10(18-X) = 125 Cents.
5x + 180 - 10x = 125
5x = 180-125 = 55
X = 11

(18-X) = 18-11 = 7.

To solve this problem, we can set up a system of equations. Let's denote the number of nickels as "n" and the number of dimes as "d".

1) We can start by writing an equation for the total number of coins: n + d = 18.

2) We also know that the total value of the coins is $1.25. Since a nickel is worth $0.05 and a dime is worth $0.10, we can write the equation: 0.05n + 0.10d = 1.25.

Now we have a system of two equations:
n + d = 18
0.05n + 0.10d = 1.25

To solve this system, we can use either substitution or elimination method. Let's use substitution:

From the first equation, we can solve for n:
n = 18 - d

Now, substitute this value of n in the second equation:
0.05(18 - d) + 0.10d = 1.25

Simplify the equation:
0.9 - 0.05d + 0.10d = 1.25
0.05d = 1.25 - 0.9
0.05d = 0.35

Divide both sides by 0.05:
d = 0.35 / 0.05
d = 7

Now substitute the value of d back into the first equation to find n:
n + 7 = 18
n = 18 - 7
n = 11

Therefore, John has 11 nickels and 7 dimes.