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.
I had similar problems with this. What I tend to do is to hold down the pedal on the far right called the sustaining pedal. However, this also holds down all the other notes played and can sound quite messy. An alternative it the sostenuto pedal, the one in the middle. Perhaps this picture can explain it better then I can: https://www.google.com/imgres?imgurl=https%3A%2F%2Fqph.fs.quoracdn.net%2Fmain-qimg-258d344478e3577d555016a8bf6b78dc&imgrefurl=https%3A%2F%2Fwww.quora.com%2FIs-3-pedals-piano-necessary-to-start-learning-piano-or-only-one-pedals-witch-comes-with-digital-piano-like-p-255-is-enough&tbnid=awwqZrsjTbW2_M&vet=12ahUKEwjm1anVjqXqAhUYwoUKHVFzCDUQMygOegUIARDVAQ..i&docid=qEj-R-767DhVzM&w=602&h=509&q=sostenuto%20pedal&ved=2ahUKEwjm1anVjqXqAhUYwoUKHVFzCDUQMygOegUIARDVAQ
That is the only way unless if you have abnormally large hands and can play it without even stretching.
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.