Similarly to what Mats said, Bad Ape supposedly learnt off other humans who would shout at him and abuse him. Obviously considering that Bad Ape never took ALZ-112 or ALZ-113, he didn’t suddenly develop any extra intelligence. This does make it a little unbelievable possibly, but I don’t really question it since there is a few different ways it could be explained.
Eg. Simian Flu viruses could intellectually boost apes if they were exposed to them?
Or maybe he was just a particularly clever chimp anyway who could listen and try to act like his masters, and eventually achieved it. It could also be that Bad Ape’s masters tried to train him to talk which may have helped him learn, but idk otherwise.