With Dink, his friendship becomes more of a competition. He and Dink suddenly both become commanders, making competition between them. Ender is a little kid, and Dink is jealous that Ender has also got command.
With Petra, the relationship just grows apart. He could not see Petra anymore because of Bonzo, and when he was older, he chose not to because he and Petra were still competing.
Hope this helps! Have a happy New Years!