During the time interval, Trafalgar Law was responsible for a major incident known as the “Rocky Port Incident”. Although the exact details of the incident are currently unknown, Marine Captain Koby protected the citizens during the incident and became a hero. Blackbeard managed to defeat Ochoku (Wang Zhi) with some form of help from Koby, making him the new boss of Hachinosu (Pirate Island).
Wang Zhi is the name of a Chinese pirate who actually lived in our world who is famous for trading arms with Europe, SEA, Chinese and Japan.
So what happened? We can assume that the Rocky Port is not on Pirate Island, which is currently occupied by the Blackbeard Pirates. It is more likely to occur elsewhere. Law makes a scene for an unknown purpose at this time (perhaps related to the 100 Pirate Hearts he gave to the Navy or his trying to disrupt Doflamingo’s clandestine deal with Kaido).
Rocky Port could be a famous trading port used for normal trade by citizens and some pirates and also used for arms trade. Wang Zhi could be the owner of the port and the pirate island. Koby is presumably there for the SWORD to investigate the illegal arms trade, much like Drake reports to Koby that he saw CP0 trading weapons with Orochi.
So what happens is that Law could lure Wang Zhi and his 100 trading pirate partners and attack him in Rocky’s Port, causing a scene where Koby has to help evacuate the citizens around the port area. Law got the 100 hearts of famous pirates from this port. Koby could have a role in this battle (Law+Koby vs Wang Zhi and his gang). Deprived of men and his alliance to fight, Wang Zhi tries to escape and takes refuge on the pirate island which was his base at the time. Blackbeard somehow knows that Wang Zhi is in his venerable stage, so he does what he does best, which is to attack people in their weakest state. Blackbeard then takes control of the pirate island.
What we still don’t know is what Koby actually did during this incident. Did he only rescue citizens or did he chase Wang Zhi to Pirate Island? This is why Koby was able to meet Wang Zhi on the Pirate Island, which allowed Blackbeard to take down Wang Zhi.