Summary
These pessukim are about Moshe begging Hashem for him to let him go into Israel. Moshe knows that he does not deserve to go into the holy land, but he wants Hashem to do him a favor. He knows that he does not deserve it, but since he took care of Bnei Yisroel for so long. Hashem gets mad and he will not answer Moshe. Afterwards he told Moshe to encourage Joshua because he will be the one to take the people into Israel. After all of the begging Hashem let Moshe see Israel from the mountains.
Example number 1 of Moshe showing leadership
(2) למענכם ON ACCOUNT OF YOU — You caused this for me (that God was wroth with me); similarly, it states, (Psalms 106:32) “And they provoked Him at the waters of Meribah, and He did evil to Moses on their account".
Rashi is saying that Moshe can not go into Israel because of something that he did for Bnei Yisroel. He does not say that it's all your fault, I can't go into Israel because of you. Rather then putting them down all he said was that I can't go because of something that I did for you. Moshe is showing leadership because he is trying to not put them down even if it was Bnei Yisroels fault. As a leader it is very hard to keep your opinion out of the situation, but Moshe did not make it personal and he stated the facts and the facts only. Those are qualities of a leader.
Example number 2 of Moshe showing leadership
(28) Give Joshua his instructions, and imbue him with strength and courage, for he shall go across at the head of this people, and he shall allot to them the land that you may only see.”
In this second example Hashem is telling Moshe to encourage Joshua to take the people into the holy land. Moshe could have been bitter and said "if I'm not able to go into Israel why should I help you." But instead he opens up to the idea even though it is really hard to do. As a leader he still has to do his job, and he has to encourage Joshua that what happened to Moshe will not happen to him. This is so hard to do because imagine if you were fired from your job, but then you had to encourage the next guy to do your job that is really hard, but Moshe put away his emotions and kept doing his job. So as a leader we can learn that you have to put away your emotions and do what is best for your people.