If he could kill Roger, he would have captured him and we both know he didn't. Weaker individuals can corner people(Shiki cornered Roger himself and they were only saved due to weather condition in their favor), especially when we don't know the means he used to accomplish this(maybe he had thousand allies and prepared plans), neither do we know exactly when the events happened. It could have easily been when Roger wasn't in his prime. Smoker cornered Luffy a lot of time for example, but Luffy is stronger than Smoker at the moment and will remain like this until the end of the manga considering his final rival is likely Blackbeard.Garp is known to be the one who cornered roger and they almost got killed by each other not WB and i don't know why you think garp is weak.Garp is known as the hero & strongest among marines.roger trusted a marine to raise his child not WB itself shows the trust that roger had in garp and his strength.Garp has haki & he tried to kill akainu without any fear(many people say akainu is the strongest of admirals) and sengoku stopped him.so he is clearly strong.
Hypewise, Garp isn't put on the same pedestal as Roger/Prime Whitebeard. Buggy who was sailing with Roger and must certainly know Garp said only Whitebeard could stalemate Roger in a fight(in his younger days). Old and Sick Whitebeard got the title of world strongest man infront of Garp. Garp is simply not on Prime Whitebeard/Roger level