NOVELTY - A feedstock is crushed by multi-stage thermochemical process, and obtained raw gas streams are combined with synthesis and product gases, to produce solid residue containing spent catalyst, inert minerals, and formed coke. Carbochlorination process is carried out in a steam methane reactor using molten metal compounds between exothermic carbochlorination process and endothermic steam methane reforming process. Thus, the integration of carbochlorination into staged reforming operation is enabled, and produced a product gas used as fuel in boiler, turbine and fuel cell.    USE - Method for integration of carbochlorination into staged reforming operation for recovering valuable metals from byproduct stream and producing product gas used as fuel in boiler, turbine, internal combustion engine and fuel cell for petrochemical and refinery operations (claimed).    ADVANTAGE - The carbochlorination process is efficiently and economically integrated into staged reforming operation by environmentally-friendly method. The coke is efficiently produced as byproduct of thermochemical process and used as heat carrier and/or reactant in carbochlorination, product gas cracking, hydrotreatment, direct water-gas production, hydrogen production, boudouard reaction, gasification, reforming, calcinations and metallurgy processes.    DETAILED DESCRIPTION - A feedstock is crushed by multi-stage thermochemical process, and obtained raw gas streams with varying composition are combined with synthesis gas and product gas, to produce solid residue containing spent catalyst, inert minerals, and formed coke. Carbochlorination process is carried out in a steam methane reactor using molten metal compounds as a heat carrier between exothermic carbochlorination process and endothermic steam methane reforming process, in which the raw gas streams are combined to form appropriate stoichiometric proportions of hydrogen and carbon for forming synthesis gas which is consumed by downstream processes. Thus, the integration of carbochlorination into staged reforming operation is enabled and produce a product gas used as fuel in boiler, turbine, internal combustion engine and fuel cell for petrochemical and refinery operations. An INDEPENDENT CLAIM is included for apparatus for separating rare earth elements from alkali halide melt.    DESCRIPTION OF DRAWING(S) - The drawing shows a flowchart explaining integration of carbochlorination.    Hydrogen separation (1.01)    Feed separation (1.03)    Flash smelting (1.04)    Steam methane reaction (1.05)    Electrochemical process (1.08)