i think i can give you an idea as to why one of them is doing that.
he's afraid...scared...stressed...whatever you want to call it.
i have an Electric Yellow Cichlid or Lab, and he was showing the same signs. he lives in a turtle tank, and when it was only him and my turtle he was fine. then my parents bought two more african cichlids, an electric blue and a red zebra or something similar, and the yellow guy started to behave like yours. I put him in my tank, and right away he was swimming fine, getting along just great. put him back after he attacked my betta, and right away, went back to the corner...
the electric blue got eaten by the turtle (!!!) and I removed the red zebra and gave it to a friend with a cichlid tank..so it was back to him and the turtle alone, and he's doing great again! he swims in there like he owns the place, and he actually bites the turtle's feet!
so i really think it's a matter of being bullied. what size is your tank? these fish need to be kept either alone or with a lot of them so that aggression is never directed to a single fish.
with regards to the food, not sure what to tell you. my yellow lab refuses to eat flakes. he is always fed regular tropical fish granules and he is doing great (about 4.5 months by now, and he's grown 3x his original size). i have also fed him both bloodworms once (messy incident, never again) as well as "seamonkeys" or brine shrimp
though from my understanding they benefit from a vegetable-based diet as that would most closely resemble their diet in the wild (i.e. algae) and eaten too much meat/fiber can cause "malawi bloat."
hope that helps and best of luck!