Having lots of civilians in them doesn't make it terrorism. It would only be terrorism if they had only civilians in them--a totally nonsensical assumption as by then our primary bombing target was military production. Given the dispersed nature of that production the only way we could actually destroy it is to destroy the cities it was in. Thus our bombing campaign at that point was the systematic destruction of Japanese cities.
Whether it was by nuke or firebomb is irrelevant. Without the bomb Hiroshima and Nagasaki would have been destroyed anyway.
Even if the bombs were targeted exclusively at civilians, the bombings would not be considered terrorism, as a state military, acting within the laws of that state, cannot commit acts of terrorism.
https://en.wikipedia.org/wiki/Definitions_of_terrorism
Using the 'most common definition' provided in the article:
[TABLE="width: 500"]
[TR]
[TD]It is the use of violence or threat of violence in order to purport a political, religious, or ideological change[/TD]
[TD]
The US dropped the bombs to coerce Japan into immediate surrender.[/TD]
[/TR]
[TR]
[TD]It can only be committed by non-state actors or undercover personnel serving on behalf of their respective governments.[/TD]
[TD]
The bombings were committed by the US military, a state actor[/TD]
[/TR]
[TR]
[TD]It reaches more than the immediate target victims and is also directed at targets consisting of a larger spectrum of society.[/TD]
[TD]
The bombs were targeted at entire cities, the 'immediate target' being the military industries in the city.[/TD]
[/TR]
[TR]
[TD]It is both
mala prohibita (i.e., crime that is made illegal by legislation) and
mala in se (i.e., crime that is immoral or wrong in themselves).[/TD]
[TD]
The bombings were not mala prohibita in the USA[/TD]
[/TR]
[/TABLE]