That reraise is crazy, but he did correctly assume that neither of you two were on draws, so he had 15 outs on the flop, which is good for a 54% chance of hitting a straight or flush.
But, he may not have figured on your set, which would've made a board pair kill his outs.
The preflop is the most confusing part. I'd like to know what stakes the game was at as well.