Tony plays a game in which he takes $40$ nickels out of a roll and tosses them one at a time toward his desk where his change jar sits.  He awards himself $5$ points for each nickel that lands in the jar, and takes away $2$ points from his score for each nickel that hits the ground.  After Tony is done tossing all $40$ nickels, he computes $88$ as his score.  Find the greatest number of nickels he could have successfully tossed into the jar.
1. Let \( x \) be the number of successful tosses (nickels that land in the jar).
2. Let \( y \) be the number of failed tosses (nickels that hit the ground).
3. We know that the total number of nickels is 40, so we have the equation:
   \[
   x + y = 40
   \]
4. Tony awards himself 5 points for each successful toss and deducts 2 points for each failed toss. Therefore, the total score can be expressed as:
   \[
   5x - 2y = 88
   \]
5. We now have a system of linear equations:
   \[
   \begin{cases}
   x + y = 40 \\
   5x - 2y = 88
   \end{cases}
   \]
6. To eliminate \( y \), we can multiply the first equation by 2:
   \[
   2x + 2y = 80
   \]
7. Adding this to the second equation:
   \[
   5x - 2y + 2x + 2y = 88 + 80
   \]
   Simplifying, we get:
   \[
   7x = 168
   \]
8. Solving for \( x \):
   \[
   x = \frac{168}{7} = 24
   \]
9. Substituting \( x = 24 \) back into the first equation to find \( y \):
   \[
   24 + y = 40 \implies y = 40 - 24 = 16
   \]

Thus, the greatest number of nickels Tony could have successfully tossed into the jar is \( \boxed{24} \).