Answer: The contraction "he'd" can generally mean two things: he had or he would. In this context it means "If he worked hard, he would pass the exam." In this context he failed the exam because he didn't work hard enough.
Explanation: hope this will help you!