Obama bashed Trump for causing fuel prices to surge and what he saw as the unnecessary deaths of service members in a war that has raged on for nearly eight months