action to recover damages paid on behalf of another