On some instability problems in ferromagnetic configurations in porous and non_porous medium and thermohaline configurations in porous medium