why not recall the moment you took this pic? clearly, either your friend or your camera moved when the shot was taken, and i think your flash was on rear curtain sync/slow sync.
try setting your camera back to the same settings and play around... i think you'll be able to reproduce the same...