Investigation of Fano resonances in the optomechanical cavity via a magnetic field