You only need to defeat one Dodongo Snake and leave the room for this mini boss.
At the beginning of the fight, run into the bottom wall twice to make the eye slime fall to the ground and avoid being stunned. Then, slash him until he gets thin enough so you can dash into him to separate into two smaller slimes. Spin attack both of them twice to win the fight.