What does it mean to be prosperous when meeting a sheep, and to be exhausted when meeting a horse?

Meeting sheep and being honored refers to Pang Juan as the general of Wei.

Since Pang Juan left Guiguzi, he came to Wei State all the way. First, he went to the Prime Minister Wang Cuo's house and discussed the art of war with Wang Cuo. Wang Cuo was very interested and recommended him to King Hui of Wei. When Pang Juan entered the court, he happened to catch up with the king of Wei for dinner, and the people brought him a steamed sheep. Pang Juan was overjoyed because his teacher said: "You will be honored when you meet a sheep." It seemed that he was about to make a fortune from now on. Sure enough, he rose through the ranks, was placed in the important position of the King of Wei, and commanded the army.

Failing after encountering a horse refers to Pang Juan's death from random arrows in the Battle of Maling. Pang Juan was led into Maling Road by Sun Bin using the strategy of reducing the stove, and an ambush was set up in the deep valley. Pang Juan also died from random arrows, which was in line with the saying of "being killed by a horse".

Extended information:

Guiguzi has a famous prophecy: "When you meet a sheep, you will be prosperous, but when you meet a horse, you will be exhausted." It is related to his disciple Pang Juan. Pang Juan worshiped Guigu for three years. It happened that the State of Wei was seeking talents with a lot of money. Pang Juan, who had accomplished his studies, decided to go down to work for the State of Wei and use his talents to create a career.

Gui Guzi had known about this and wanted to calculate his future and destiny for his disciple Pang Juan, so he ordered Pang Juan to go to the mountains and fetch a flower. However, the flowering period was over at this time, and Pang Juan searched for most of the day before he found a flower. However, he thought that this flower was too weak to be used as a useful flower, so he wanted to find another flower, but the search was fruitless. In desperation, he had to take this flower. The grass and flowers that were about to wither returned.

But Pang Juan felt regretful, so he hid the flowers in his sleeves and lied that there were no flowers in the mountains and he had not found them. Guiguzi smiled slightly and asked, "If that's the case, what's in your sleeve?" Pang Juan was shocked and had to hand over the grass and flowers.

Gui Guzi said in detail: "This is Aristolochia. When it blooms, twelve flowers bloom together, which is the year when you will become prosperous. It was collected from Gui Valley and withered in the sun, 'Ghost'" If you get a Wei, you will be proud of it in the future."

He also mentioned what Pang Juan had concealed just now, and said: "But you just deceived me, and you will definitely be deceived by others in the future, so you must be on guard." So he gave Pang Juan an eight-character motto: "When you meet a sheep, you will be honored. "I met a horse and died." Pang Juan was grateful and kept it in his heart.