If you spend all your time arguing about how a word should be defined you are, in general, wasting yourself and everyone else's time.
If we say that 'terrorism' means 'an attack as part of a movement or organisation to instil fear as a means to a political end', neither was a terrorist attack.
If we say that it means 'a politically motivated attack' and nothing more, then probably both were 'terrorist attacks', but that rather reduces the meaning of the word 'terrorism'.
Whilst one may, in my view, be more useful than the other, each is as correct as the other, making the argument over whether an attack was 'terrorism' or not a complete waste of time.
Either way, it can certainly be said that they were similar attacks: lone nutjobs taking it upon themselves to attack people they hated. Beyond that there's not much point in arguing about it.