My question is that how to do gusl during fast? Can we put water in mouth and in nose?

Like in normal days you do ghusl, same way you should do Ghusl while you are fasting. There is no difference and objection for Ghusl while you are Fasting in the Holy month of Ramadan.
First of all in any Ghusl there is no need to wash inside the nose and ear and mouth.
But if anyone wants to do so he can do, the only precaution you have to take is that water should not pass through your throat.