Under what background was the poem "The First Generation of Baidicheng" written by Li Bai?

In the "An Shi Rebellion", Li Bai was exiled to Yelang (now eastern Guizhou) in 758 AD because of his involvement in the Li Lin case in Wang Yong. The following spring, Li Bai was escorted from Sichuan to the exile. When I arrived in Baidicheng, I suddenly received a pardon from Su Zong. Li Bai, who was overjoyed, suddenly felt like a bird rushing out of the cage. The suffocating and overwhelming hardships and grievances that were difficult to wash the snow suddenly vanished, and immediately got up and took a boat from Baidicheng to Jiangling. Write this poem on the way, and express the joy and carefree mood at that time incisively and vividly.