Question 605685
Let b be the number of bolts that he bought and p be the original price of the bolts 

From our question, the first time he went to the store we get:
{{{bp=40}}}

The next time we get:
{{{(b+5)(p-0.40)=40}}}

We can set these two equations equal to each other and solve for b:
{{{bp=(b+5)(p-0.40)}}}
{{{bp=bp-0.4b+5p-2}}}
{{{0.4b=5p-2}}}
{{{b=(5p-2)/0.4}}}


Unfortunately since we do not have the originaly price we cannot get the exact number of bolts but if we were given an original price we could substitute it into the formula above and solve for b.  
Hopefully this helps a bit?