IUPAC nomenclature query
Your name is correct, while the given one is not. When the set of locants for subsituents would be the same no matter what, you would assign the lowest locant to the substituent that appears first in the name, which, by alphabetical order, it would be the ethyl group in this case. Hence 4-ethyl-5-methyloctane is the right name.