Question 980224
{{{x}}}= number of whole dollars in the check amount.
{{{y}}}= number of cents in the check amount.
{{{100x+y}}}= value of the check amount, in cents.
{{{100y+x}}}= amount given by the bank teller, in cents.
{{{100y+x-5}}}= amount taken home (after spending a nickel at a gum machine), in cents.
"When I returned home, I found I had exactly twice the amount of the check" translates as
{{{100y+x-5=2*(100x+y)}}} 
We work with that equation to find a solution that makes sense for the story in the problem.
We need a pair of non-negative integers (x,y), with {{{y<=99}}} .
Solving:
{{{100y+x-5=2*(100x+y)}}}
{{{100y+x-5=200x+2y}}}
{{{100y+x-5-2y-x=200x+2y-2y-x}}}
{{{98y-5=199x}}}
{{{98y-5+5=199x+5}}}
{{{98y=199x+5}}}
{{{y=(199x+5)/98}}}
{{{y=(196x+3x+5)/98}}}
{{{y=196x/98+(3x+5)/98}}}
{{{y=2x+(3x+5)/98}}}.
The equation above is a linear equation with an infinite number of (x,y) pairs,
but to fit the story the solution pair (x,y) must meet stringent requirements.
We need a pair of non-negative integers (x,y), with {{{y<=99}}} .
For {{{y<=99}}} to be a non-negative integer,
{{{(3x+5)/98}}} must be a non-negative integer with {{{(3x+5)/98<=99}}} ,
meaning that {{{3x+5=98n}}} for some non-negative  integer {{{n}}} ,
and {{{98n<=99}}}<-->{{{n<99/98}}} .
So, we are limited to {{{n=0}}} and {{{n=1}}} .
{{{3x+5=98*0=0}}} gives us a negative fraction for {{{x}}} , so it does not work.
{{{3x+5=98*1=98}}}--->{{{3x=98-5}}}--->{{{3x=93}}}--->{{{x=93/3}}}--->{{{highlight(x=31)}}} .
Then, {{{system(y=2x+(3x+5)/98,3x+5=98,x=31)}}}--->{{{y=2*31+1}}}--->{{{y=62+1}}}--->{{{highlight(y=63)}}} .
The exact amount of the check was {{{highlight("$31.63")}}} .