"These were his last words."
Translation:To byla jeho poslední slova.
That's the same problem that occured in one sentence in the Russian for English speaker course.
Let me explain this on an example: there is a difference between the following sentences:
"Is that a word?" "Is it that word?"
In the first one, 'that' refers to some imaginary subject (could be replaced with 'it', but not with 'the'), in the second one it functions as a sort of article (could be replaced with 'the', but not with 'it').
The same occurs here: 'These', like Mariba66 noticed, doesn't regard nor modify "words" (it doesn't necessarily have to be right next to this word in order to modify it), it is the subject of this sentence, we could replace it with "they". That's why, not being a part of the noun phrase, it doesn't take the noun's gender but rather the neutral form.