Recovery from spent acids containing metallic ions