While commercial turtle pellets can be a quality component of your yellow-bellied turtle's diet, they should not form the entire diet.
Why would a turtle eat another turtle?
Turtles have no compunction about eating another turtle. To them, food is food. If one has started to be aggressive toward another, it most likely, will continue. It is usually the meanest and or the biggest that will cause the problem.
Do turtles like to be with other turtles?
While your pet turtle is content to live alone, some pet turtles cohabitate well and thrive with others. While you should generally house tortoises with members of their own species, and a few aggressive species cannot have any cage mates, many aquatic and terrestrial turtle species cohabitate well.