I read in a Korean textbook the following sentence:
그는 대학교에 합격해서 정말 기쁘다
The textbook said this is correct. But to the next sentence
그는 대학교에 합격해서 정말 기뻤어?
This textbook said that the sentence is wrong. Can you tell me why this sentence is wrong?
기분이 좋아요 is a kind of in-between case. It is primarily used for the first person but also for the third person sometimes (e.g. 영철이는 오늘 기분이 좋아요). This is one difficulty aspect with the emotional words. We can't blindly lump all emotion words in the same group - there are some that are used a little differently.
For your sentence, we can say it a few different ways for the third person.
그는 첫 월급을 받아서 기분이 좋은가 봐요. = He seems to be in a good mood ...
그는 첫 월급을 받아서 기분 좋아 해요.= He is in a good mood ...
(기분 좋아 해요 is very common in informal speech - we don't put 이 after 기분 in this case)
그는 첫 월급을 받아서 기분이 좋아요. (I think this is also used, just less common)
Compare the last sentence with the following.
그가 첫 월급을 받아서 기분이 좋아요. = I feel happy that he received his first pay.
= 나는 그가 첫 월급을 받아서 기분이 좋아요.
As I mentioned in my first post, using 그가 makes it part of the sub-clause, so people take the meaning differently, because when we use 가 before a sub-clause, it is usually taken as the subject (this is more of a convention and habit rather than hard grammar rule).
But if you say 기분이 좋아요 with no sub-clause, using 이/가 is also fine.
영철이는 기분이 좋아요. = 영철 is in a good mood.
영철이가 기분이 좋아요. (same)
(영철이는 is more common, but 영철이가 can also be used, and there's no ambiguity but only slight nuance, because there's no sub-clause that can introduce multiple interpretations.)
(compare it with)
영철이 때문에 기분이 좋아요 = I am happy because of 영철.
This illustrates the difficulty with this class of adjectives. The rule is not so clear cut. If you start a sentence with a third person subject marked with 은/는, it sends a pretty strong signal that it is the subject and sometimes can override the emotional adjective restrictions. If you mark it with 이/가, this effect is lessened but it may still have the same results if the sentence is so simple there's no chance of misunderstanding.
In sum, the usage of emotion adjectives can be affected by other elements in the sentence. The key is whether there might be a confusion concerning who the emotion belongs to, the speaker or the third person, and this aspect can be very subtle. It takes a lot of experience with the language to master this usage.
It is an advanced subject, and some sentences listed as correct in the book (I did a google search and saw other examples) are not really natural, which makes the discussion more complicated.
The main point about these examples is what we call First Person Emotion Adjectives. A class of adjectives, like 기쁘다, 슬프다, 부끄럽다, 안타깝다, and many more, are specialized for the first person, meaning they are only used for direct description of one's own feelings, and for the third person a related verb in -아/어하다 form is used instead.
나는 우리 팀이 이겨서 기쁘다. (기쁘다(a) used for 1st person)
영철이는 자기 팀이 이겨서 기뻐한다. (기뻐하다(v) for 3rd person)
Likewise for your example, we may have these variations.
나는 대학교에 합격해서 정말 기쁘다 = I am really happy that I have passed the college entrance exam. (clear and natural).
그는 대학교에 합격해서 정말 기쁘다. Problematic.
The above sentence might be interpreted in two ways.
그는 [대학교에 합격해서] 정말 기쁘다 = He is really happy that he has passed ...
This sentence is wrong because 기쁘다 can't be used for the third person 그, as was mentioned above.
[그는 대학교에 합격해서] 정말 기쁘다 = I am really happy that he has ... (note the subject I)
In this sentence, the main clause's implicit subject is 나, and 그는 is the subject of the sub-clause. So it is correct because it's essentially 나는 ... 기쁘다 with the ... part giving the reason why.
But it sounds confusing and unnatural because of 그는. When we give a reason in a sub-clause, the proper particle is 이/가 because we are not talking about our thoughts about the subject (그) but just supplying a relevant fact to be used in the more important idea of the main clause.
So the natural way to say it would be:
그가 대학교에 합격해서 정말 기쁘다 = I am really happy that he has passed the college entrance exam. (clear and natural)
Again two ways to interpret it.
그는 [대학교에 합격해서] 정말 기뻤어?
그는 is the main subject, so it is ungrammatical because of 기뻤어. 기뻐했어? would make it correct.
[그가 대학교에 합격해서] 정말 기뻤어? = Were you really happy that he has passed the college exam?
This sentence is fine - the main subject is implicit you because it's an interrogative sentence.
So neither of your examples are perfectly clear. The source of confusion is using 은/는 on the noun which can be both the main and sub-clause subject. We typically such 은/는 for the main subject, but in your example it seems to be used for the sub-clause's subject, making both sentences unnatural.
은/는 can be used in a sub-clause too if a contrast effect is intended, but that is not the case in this single sentence example.
Unfortunately, the usage of these adjectives is not so clear cut that you simply can never use 기쁘다 for the third person. If the context or construct used gives enough clue that it is not talking about the speaker themselves, then it is possible to use such an adjective with the third person.
One example is a description in a story (like a novel written in third person or narration in a drama). These are special contexts where the writer/narrator is just telling the story never appearing in a real scene. The reader/viewer knows they won't be saying anything about themselves, so any such adjectives will apply to the person appearing in the story (third person).
철수는 자기 팀이 이겨서 너무나 기뻤다 (fine in a story setting).
If an indirection is added to such an adjective, by quoting it for example, then you can use it for the third person because there is no chance of misunderstanding.
철수는 자기 팀이 이겨서 너무나 기쁘다고 한다 (fine because of -고 한다)
So the most common case to avoid is using such an adjective for the third person in a simple and direct sentence (especially in the present tense) in everyday conversation.
It is a rather complex subject, so I hope I didn't confuse you even more. I suggest you read up on this topic in grammar books and sites (but I would recommend against the book you got these examples from) and practice with real examples.
Both sentences look right to me.
Strictly speaking, in the above comment, "그는 첫 월급을 받아서 기분 좋아 해요.= He is in a good mood ..." is not right. It is close to "He is being in a good mood ...". In other words, he is in a good mood, so he expresses it by acts -- eg. a cheerful facial expression or yelling out a cheer.