Two things. First, possibly your cassette is worn out as you suspect. A worn chain will cause a worn cassette. Second, your derailleur is mis-aligned. The first picture makes it look bent in, and this will cause all kinds of problems. There is a tool to check this, the Park DAG-2, but you don't necessarily want to buy it. Take the bike to a shop and have them do it for you. Once it is aligned everything else can be adjusted.