Where did Hashem command Yehoshua?
Rashi: In the Torah (Devarim 31:23) "va'Ytzav Es Yehoshua."
Regarding what did Hashem command Yehoshua to strengthen himself?
Rashi: Regarding war - "Al Ta'arotz v'Al Techas." 1
Radak: It means 'I made you zealous', like "ha'Lo Shelachticha" (Shoftim 6:14).
Malbim: Here (in verses 6,7), He commanded him to strengthen himself regarding inheritances and guarding the Torah.
Why did Hashem refer to himself in the third person?
Radak: We find like this
Why does it say "Al Ta'arotz v'Al Techas"?
Malbim: "Al Ta'arotz" corresponds to Chazak. "V'Al Techas" corresponds to ve'Ematz, i.e. retaining the Chizuk in his heart and never falling from his level.