A free boundary problem arising in magnetohydrodynamic system