You can remember the meaning of 上尉 with this easy mnemonic:
My captain upped (上) my rank to a military official (尉).
Using mnemonics to remember the meaning of Chinese characters like can have an enormous impact on how long to learn Mandarin it takes.