This situation has two unknowns - the total number of half dollars and the total number of quarters. Because we have two unknowns, we will write a system of equations with two equations using the two unknowns.
h+q=31 is an equation representing the total number of coins
0.50h+0.25q=11 is an equation representing the total value in money based on the number of coin. 0.50 and 0.25 come from the value of a half dollar and quarter individually.
We write the first equation in terms of q by subtracting it across the equal sign to get h=31-q. We now substitute this for h in the second equation.
0.50(31-q)+0.25q=11
15.5-0.50q+0.25q=11
15.5-0.25q=11
After simplifying, we subtract 15.5 across and divide by the coefficient of q.