find the five different ways to combine 100 pennies, quarters, and dimes to get $\$4.99$? here's where I am so far.    
I define two equations with three variables


*

*$q$: the number of quarters,

*$p$: the number of pennies, and

*$d$: the number of  dimes.


\begin{gather*}
p+d+q = 100\\\\
25q+10d+p = 499
\end{gather*}
I eliminate $q$ by substitution and get
$$
24p+15d = 2001
$$
now I'm lost.  I think this has something to do with the $\gcd(24,15) = 3$.
however, I am unsure how to apply this information.   I am certainly more interested in the process than just the solution.   I'm having some trouble with how to solve a two variable equation.  
 A: Elimination is a good idea.  I think the details are not done correctly. In any case, I would rather eliminate $p$, the arithmetic is easier. We get
$24q+9d=399$, or equivalently
$$8q+3d=133.$$
We can use general techniques to solve this Diophantine equation, but the numbers are so small that it does not seem worthwhile.  Note that when $q=2$, then $133-8q$ is a multiple of $3$, and we get $q=2$, $d=39$, and therefore $p=59$. 
Now we have found one solution. We need others.
Go back to the equation $8q+3d=133$. We have found one solution, $q=2$, $d=39$. 
For any integer $k$, we therefore have
$$8(2+3k)+3(39-8k)=133.$$
(Note the cancellation.) 
Substitute various values of $k$. With $k=1$, for example, we get the solution $q=5$, $d=31$. That gives $p=64$.  
Continue, using $k=2$, $3$, and so on. For the sake of reality, we will have to make sure that our values of $q$, $d$, $p$ are all $\ge 0$. We cannot use $k\gt 4$, for that would give negative $d$. 
A: There is no single "best" way to solve a problem like this, but here's an approach that works well.
Eliminate the dimes from $p+d+q=100$ and $p+10d+25q=499$ to get 
$$9p-15q=501$$
Dividing both sides by $3$ and moving things around gives
$$5q=3p-167$$
Clearly we need to choose $p$ so that the right hand side is a non-negative multiple of $5$.  A little trial and error produces $p=59$ as the smallest such number, with $q=2$ as the corresponding number of quarters (and thus $d=39$ for the number of dimes).  You get more solutions by incrementing $p$ by multiples of $5$, i.e.,
$$p=59, 64, 69, 74, 79, 84,\ldots$$
with corresponding $q$s in increments of $3$:
$$q=2,5,8,11,14,17,\ldots$$
This gives the total number(s) of pennies plus dimes as
$$p+q=61,69,77,85,93,101,\ldots$$
and from this we see why there are only five solutions:  You can't have $p+q=101$, since that would require a "negative" dime.
A: Reduce the equation to $8p+5d = 667$. Solve $8p_0+5d_0=1$ for integers $p_0,d_0$. Let $p_1=667p_0$ and $d_1=667d_0$. Then $p_1,d_1$ are integer solutions to $8p+5d=667$, and you can write any solution to this as:
$$p=p_1+5k, d=d_1-8k$$
for some integer $k$.[*]
Now you need to add the conditions:
$$p\geq 0, d\geq 0, p+d\leq 100$$ to get all valid values of $k$.
[*] More generally, if $a,b$ are relatively prime and $x_0,y_0,c$ are integers so that  $ax_0+by_0=c$ then the complete set of integer solutions to $ax+by=c$ are the pairs $(x,y)=(x_0+bk,y_0-ak)$. where $k$ can be any integer.
