Welcome to the forum!
As has been stated, check to make sure the track is getting a full 18 volts to operate any command equipped loco. Try resetting all command transmitters/receivers that are capable of being reset. Re-assign a different number to the loco. If the locomotive still does not work properly, a phone call to Lionel's service department is in order. If everything checks out per Lionel's service call, a trip to a local Lionel Authorized repair station should be undertaken so that the locomotive can be checked there. If a problem is found with the locomotive, then the buyer and seller must come to a mutually agreeable settlement for either repair, or return/refund.
Larry