Here are some examples:
* "He was formerly a teacher, but now he's a writer." This means he used to be a teacher but has changed professions.
* "The building was formerly a hotel, but now it's an apartment complex." This means the building's purpose has changed.
* "She was formerly known as Sarah, but now she goes by Sally." This means her name has changed.
"Formerly" is often used to emphasize a change or contrast between the past and present.