You can remember the meaning of 前妻 with this easy mnemonic:
Who is that in front (前) of us? Is that my ex-wife (妻)?
Using mnemonics to remember the meaning of Chinese characters like can have an enormous impact on how long to learn Mandarin it takes.