Let $D$ be the check's actual number of dollars and $C$ be its actual number of cents. Then the actual amount of the check, expressed in pennies, is
$$A=100D+C$$
The amount the man is given is
$$G=100C+D$$
The pertinent equation is
$$G-5=2A$$
Can you take it from there?
Added later: A couple of people correctly admonished me for leaving the hard part of the solution for the OP to do. That wasn't really my intention; I had miscounted the three equations as having three unknowns. Let me try to atone for that by suggesting a fairly slick way to get to the final answer.
As others have found, the problem boils down to finding a solution in non-negative integers to the equation
$$98C-199D=5$$
with $C\lt100$. Since $98$ and $199$ have no common factor, the equation has a unique solution with $C\lt199$. Moreover, if you can find any integer solution, then you get to the solution with $C\lt199$ by subtracting an appropriate multiple of $199$. (We might note at this point that there's no guarantee that the solution with $C\lt199$ will actually satisfy $C\lt100$. If the problem had specified some amount other than a nickel, there might not be a solution.)
The standard way to solve the equation $98C-199D=5$ is to run the Euclidean Algorithm on it. But let's see if we can eyeball our way more quickly. The fact that $199$ is close to $2\times98=196$ suggests a clever multiplication of the equation by $2$:
$$196C-199(2D)=10$$
which can be rewritten as
$$199(C-2D)-3C=10$$
If we now note that
$$1990-1980=10$$
we see that
$$C={1980\over3}=660$$
is a solution (with $660-2D=10$ giving an integer value to $D$). To get it below $199$, we need to subtract the appropriate multiple of $199$:
$$660-3\times199=63$$
The corresponding value of $D$ is now
$${98\times63-5\over199}=31$$