The mistake is 'herveselves'. The correct word is 'herself' because Amy is singular.
Corrected sentence: Amy said she lived by herself for a long time.