The words 'formally' and 'formerly' are different. Why?
Formally - means officially; with proper etiquette
For example: She was formally introduced to the CEO after concluding the application process.
Formerly - in the past; in earlier times
For example: The new space, formerly owned by Company X, will be renovated this week.