You shouldnt really have both corn snakes in the same enclosure. This is for a few reasons.
1. If 1 snake gets a virus or something contagious, then the other will more than likely get it as well.
2. They could be stressing each other out. Snakes by nature are a solitary creature, only coming together to mate and to hibernate. You may not be able to see the stress, but it could be subtle, such as the snake regurging or not acting quite like it should.
3. If they are the opposite sex, the female could become gravid too early in life and cause egg binding. This could kill the snake.
As to your snake passing partially digested pinkies, this could be due to stress or possibly the temps are too warm or too cool for the snake.
What are your temps on the warm end and on the cool end?
The temps should be 80 - 82 on the warm end, 85 highest. The cool end should be in the lower 70's, 72-74 and no higher than 75. Do you have a temp gauge in the enclosure?
I dont think it would be worms, if it were, you should be able to see them in its feces. Check the temps and if the temps are correct then a trip to the vet may be the next step.
Normally the feces from a baby snake eating pinks is kind of runny, black or brown with a yellow crusty substance.
Hope this helps
Brian