Process flow for extracting rare earth