I have watched the anime and read the light novel as well but I can't understand why he feels that he is inferior?
Well, Hayama has the good looks, friends and stuff, but most of his "friends" would just stop being friends if Hayama isn't "Hayama" anymore; Most of his "friends" would just abandon him, if he were to be attacked by a bear somewhere in a forest.
He realizes this after trying to see from Hachiman's point of view, Hachiman's cynical and "real" outlook on 'the youth', society, and life in general doesn't seem too far fetched.
Hayama being the "good guy" tried to "associate" better with Hachiman because he "pities" him, but then realizes that most of Hachiman's world views are painfully accurate; and that his way of thinking isn't totally wrong either, and that is what makes Hayama think he is inferior to 8man.
or maybe because Hachiman has two girls going after him, while Hayama has a bitch, and a girl that's going to die of blood loss sooner or later. (#TeamYukinon)
The reason why Hayato feels inferior toward Hachiman lied in light novel volume 4, "Y". While they are helping Rumi, he used this situation to compete with Hachiman because he thought Hachiman's thought was what made "that person" or "Y" interested in him. So he competed with Hachiman secretly to prove Hachiman's belief is not good enough for that person to focus on Hachiman and to prove his own ideal is right.
But the final result in this mission proved Hachiman's belief is right (those girls did anything to survive, even sacrificing each other). So Hayato was defeated for the first time by Hachiman. Actually, he would feel inferior toward Hachiman before the summer camp will start, but this incident made him feel like that clearly for the first time.
If you want to know who is "y" and how Hayato hates hachiman, you can read in Yahari Bento!! Wordpress, and if you want to know his story that related with "love triangle", you can explore more by using tag "Hayama Hayato" in this link.
The answer proved to be more complex than I originally thought it would be. In short Hayama feels inferior to Hachiman because he was able to do something that Hayama had been trying to for a long time, that is to help Yukinoshita.
It would take too long to explain in detail but if anyone is interested they can check out Hayama character analysis at Oregairu analysis
The existing answers have an element of truth, but let me just clarify slightly.
Why does Hayama Hayato feel inferior to Hachiman? It's actually quite simple: he's a born winner and he hates losing. This can be seen when Hachiman runs together with Hayama and tries to find out what subjects he'll take. Hayama flat out ignores Hachiman and again uses the line "I hate feeling inferior to you, I'll do things my way and I'll win because that's who I am."
Hayama has always won; best at sports, popular, good looks, good academia. However, what happened after the summer camp is the most important tell-tale: Hayama came over to Hachiman with a drink and sat down next to him saying "You were right, I hate to say... However I don't think we could have been friends in school."
Why is the question? Well, Hachiman proved Hayama's attitude towards people is wrong. Hayama believes in the good in people and believed that if he tried to do what Hachiman wanted to "destroy the children's relationships so they all hate each other", then the plan would fail and the kids would all help each other. Sadly, they didn't (well Rumi did but the other kids didn't). Instead, they're throwing each other to the lions and trying to save themselves. Hachiman proved him wrong and won, Hayama acknowledged that but hates it.
It's well known Hayama loves Haruno. However, Haruno doesn't feel the same way due to her caring attitude towards Yukino. They were all in the same school. However, we know Yukino got bullied, Hayama refused to help her, and Haruno resents him for that (and therefore will never love Hayama in the same way). Hachiman did what he could never do: helped Yukino when she needed it. By taking on all the work (which an overworked Yukino was unable to do) he made the festival a success and Yukino applauded his work (which Hayama hated).
So yeah, it's two fold:
- He can't stand to lose in particular when his own attitude towards people is shown to be false and Hachiman's pessimistic attitude is more often right then not.
- He resents Hachiman because he's unable to get close to Haruno due to her resentment over Yukino, whereas Yukino openly applauded Hachiman and accepted him into her fold which Hayama failed to do.