People don't change. Not really, anyway.
They can be open minded about self improvement, and learn to manage any negative personality aspects, but they don't fundamentally change.
Petty, solipsistic (self-centered, thinks the world revolves around him. Almost narcissistic - ex: you finding a mistake in his code is not simply a correction, it's a personal affront which must be avenged) people will always be that way, and only with great effort, and strength of will would this kid become open to suggestions, criticism, and advice. Are you willing to invest the massive amount of time, energy and patience into seeing this guy change?
The best thing you could do for your company is highlight his poor behavior (which is known anyway), and make sure that he's the first one to go when the firings start, because he's costing you all time, money, and energy which is better spent elsewhere.
At the end of the day you're there to develop code, not hold the hand of some contractor who's not interested in playing nice with others. You should highlight any barriers to delivering good solutions to management, and he's one of those barriers.
Based on your comment, you're interested in answers exploring how to break it to the kid that he's not "playing nice", because you don't want to look bad to your boss for reporting his bad behavior.
My advice to you is to stick to the facts, and let your boss know that the youngster's shenanigans are costing you development time. Leave management to handle the kid's attitude problems.
I, myself, not only witnessed, but personally experienced problems when advice given a teammate in good spirit blew up in my face.
In one case, I attempted to mentor a Business Analyst who was very technically ignorant. She gladly accepted my advice, until one day she asked me to review work that she was sending way high up the food chain.
I told her that she had misunderstood what was being asked, and pointed her to resources on how to write up the proper documentation. Little did I know that the deadline was only a couple of hours away, and she didn't have time to redo her work.
In a panic, she emailed her boss, and instead of admitting she'd gotten it wrong, claimed that I'd failed to guide her, and was refusing to help her (which was not my job, at any rate). Guess who ended up having to sit down management and explain the situation.
Good thing I was unionized at the time, otherwise I'm fairly certain I would've faced termination. And why? For giving unsolicited advice to someone whom I was not responsible for in any way, shape, or form. Lesson learned.