Need more info on your setup, but 2 things you absolutely MUST DO IMMEDIATELY for both your dragons to turn out healthy, grow to the correct size, and thrive as they are supposed to without diseases or injuries:
#1) SEPARATE THEM IMMEDIATELY!! They are solitary animals in the wild, they are not happy nor "sleeping together", that's one beardie dominating the other, and what ALWAYS HAPPENS is one dragon will thrive while the other will stop eating, stop growing, develop MBD, etc. Yes, he's stressed, the other dragon is dominating him by "sleeping with him", getting the best basking spots, etc. They not only each need their own 40 gallon tank (at a minimum), but they each need their own UVB tube and Basking light, digital probe thermometer, decor, etc. AND their enclosures must be stacked on top of each other or in separate rooms so they can't see each other, because they will both be stressed,
black bearding, head bobbing, etc. if they can see each other. For now get a plastic tub and put a clamp lamp with a bright white basking bulb (halogen indoor flood bulb) for heat until you can go buy a second UVB tube and fixture, and another 40 gallon tank.
#2) GET RID OF THE RABBIT PELLETS!!! THEY'RE FOR RABBITS!!! Bearded dragons live in the Australian desert, which is hard rock and vegetation, no sand, no gravel, no "crushed walnut shells", no loose substrate at all!!! It is a huge impaction risk, and it harbors and breeds bacteria and fungi. Dump it ALL OUT, disinfect EVERYTHING inside the enclosure and the enclosure itself, and put down clean, dry papertowels that can be thrown away and replaced as they become soiled. You can worry about buying textured ceramic tiles, Non-adhesive shelf liner, carpeting, etc. in EACH enclosure later, after you get both of them into appropriate enclosures of their own with a 10.0 UVB tube and a bright white basking bulb over each.