Catija has done a good job answering your question; however, I feel like someone should elaborate on how you aren't using former and latter in the standard way:
Jim had been married twice. His former wife was a school teacher, and the latter was a nurse.
Normally, former and latter refers to two previously-named items. You imply two previous spouses when you say "twice," but they aren't listed or named. Catija fixed that by changing latter to current, but it might be worth pointing out how the sentences could be restructured such that you could use former and latter.
For example, you could say something like this:
Jim has two ex-wives, Jane and Linda. The former was a schoolteacher and the latter is a nurse.
In that example, former refers to the first of two in a list (Jane), while latter refers to the second (Linda).
These don't always need to refer to people; I could say something like:
I have two hobbies, skydiving and stamp collecting. The former is much more dangerous than the latter.
But I wouldn't (or shouldn't) say:
I have two hobbies; the former is much more dangerous than the latter.
because the hobbies haven't been explicitly named, so there is nothing for former and latter to point back to.