When looking at this part of the music, I saw the part in the bass clef and I didn't know how to play, it seems like I need 3 hands to play this part of the piece so I didn't know what to do. Please give some pointers. Thanks!
Piano, presumably? On a good piano, there's a middle pedal, called the sostenuto pedal. This will hold down the notes played while it's being pressed. So you can hold the octave Gs using it, and nothing else will be affected.
Lacking that special pedal? Then an alternative is to play the Gs in the previous bar, then press the damper pedal (on the right), to hold those notes as long as needed. The downside is that it also holds everything else in that bar while it's pressed down.
The sostenuto pedal is often mentioned, but not THAT often encountered on the pianos we actually play, even quite 'good' ones! Just use the sustain pedal. In this case, it would be depressed on the second beat of the bar, catching the low G but not the F chord. That leaves an 8th in which to move the LH up. This looks like something which would be played at a moderate or slow tempo? At a faster tempo I doubt the upper LH chord would have been written.
My first thought about how to play this was, as mentioned by others, to depress the sostenuto pedal during the second beat when the F major chord in the right hand shifts up to the G major. However the G major falls back down to F major in the next measure but the octave G in the bass should still be sounding at that point. There doesn't seem to be a way to use any pedal to sustain the G octaves while also avoiding the unpleasantness of hearing the F and G triads clashing together somewhere.