A. The war in Iraq
The war in Afghanistan, begun in 2001, was aimed against the al-Qaeda terror group that was based in Afghanistan and had perpetrated the 9-11 attacks against the United States. It also aimed to removed the Taliban government from power in Afghanistan, a government which had harbored al-Qaeda and was itself seen as an illegitimate power.
The war in Iraq was pursued beginning in 2003 as a preemptive strike against the regime of Saddam Hussein and the perception that he had stockpiles of weapons of mass destruction that could be used for terroristic purposes. That perception did not turn out to be a full reality, but the war pursued regime change in Iraq nonetheless.