How do I kill the goblins to get out of Gringott's?

Solution 1:

You need to switch to Hermione, she can throw some spells at the goblins.

Solution 2:

Use Harry to point the dragon towards the goblins then switch to Hermione and she can cast a targeted spell.