You absolutely need to separate the dragon immediately. I know you don't want to hear this, but as you admitted, you're very new to Bearded Dragons, and we are not. So I hope you'll be willing to listen and understand why both of your dragons need entirely their own tanks, lighting, etc. and need to be either stacked one on top of the other so that they cannot see each other, or they need to be put in completely different rooms...
If you're not concerned about the inevitable health issues and/or injuries/violence/death that can and always does happen, then you should separate them for no other reason than it's totally and completely unnatural for Bearded Dragons to live together or even spend time together (other than the short amount of time it takes for a male and female to come together to mate and then immediately separate). They are completely SOLITARY reptiles naturally, and if you ever go to the Australian Deserts where they live wildly you will rarely, if ever see more than one Dragon at a time. So when people get them as pets and literally force them to live with one another, they are creating an enormously stressful environment inside that tank. And most owners will say "Oh no, mine aren't stressed out at all, they like each other, they lay on top of one another, they hang-out together, they don't at all act like they are stressed", or any other number of totally superficial observations; the truth is that we have no idea what is going on inside those tanks where we force them to live together unnaturally, and ONLY ONCE WE EVENTUALLY SEE THE NEGATIVE RESULTS OF PUTTING THEM TOGETHER do we realize what had been going on inside that tank.
I don't know what sex your 2 dragons are, but the end results you're going to get are definitely influenced by their sexes. To be very straight forward, if you put a male and a female together, once they are both of age the male will literally breed the female to death, and if the endless breeding and egg-laying doesn't kill her (which it usually does), the sudden and unexpected aggression/attack by the male will (sometimes even the female is the one to suddenly snap, and it usually ends with one good bite to the skull). If you put 2 males together it's most definitely going to end in violence, either by one dragon dead and one severely injured, both severely injured, or both dead. This just does not ever work, not ever, and it ends in a very ugly fashion. And if you put 2 females together (this is the ONLY combination that has ever been successful, in the sense that they typically don't physically kill each other), it usually ends up in the most common result that you get from ANY combination of sexes put together: The stress created by the dominate/submissive dynamic inside the tank ends with one dragon thriving and one dragon dying, usually of starvation/malnutrition.
What does seem to ALWAYS happen with any combination of sexes of Bearded Dragons who are forced to live together in the same tank/enclosure (unless you have a very large room in your house that you can dedicate as their "tank", this may work) is that one dragon immediately takes the role of the dominant dragon of the 2, and the other is the automatically the submissive. We as people may or may not see evidence of this dynamic going on, if you ever see one dragon laying on top of the other, one dragon not even trying to go to the basking spot/platform that is directly underneath the UVB tube and Basking Bulb while the other automatically goes to the best basking spot, one dragon immediately going for the salad and the other holding back, even if you put 2 salads in, etc. then these are all dominant/submissive behaviors. Sometimes people take these behaviors as the 2 dragons "bonding" or "loving each other", and in reality it's just the opposite. And a lot of the time this dominant/submissive dynamic is so subtle that we don't notice it at all until it's too late.
I'd be willing to say that probably 70% or more of dragons that are forced to live in the same tank end up with one dragon growing to be large, healthy, active, and the picture of health (assuming that your husbandry is all adequate, especially your UVB lighting and your temperature gradient inside the tank), while the other dragon is stunted in growth (usually half the size of the other dragon), suffering from severe nutritional deficiencies like a calcium deficiency and MBD, or Vitamin B1 Deficiency, and suffering from the physical disabilities that result from these nutritional deficiencies, such as paralysis, chronic bowel impactions, etc. This is because the dominant dragon has been taking all of the best basking spots inside the tank with the strongest UVB/UVA light, all the best temperature zones, all the best live insects, all the best greens and veggies. These are behaviors that we cannot see happening, and before the owner know it they have one extremely sick dragon that is dying.
Of course the other issue that always seems to happen, and it WILL HAPPEN, whether it happens today, tomorrow, next month, or next year, suddenly one of the dragons just snaps and attacks the other dragon, sometimes it's one big, strong bite that takes off a leg, a foot, a tail, or right to the head/face/skull, and sometimes it's a full-on attack where either the other dragon literally gets ripped apart, or where both dragons literally get ripped apart. I personally have seen more single-bites to the skull that have killed one of the dragons than anything else; the next most prominent case is where you have 2 dragons that are just totally ripped apart from head to tail. And this will happen if you don't separate your dragons (assuming that the submissive dragon doesn't die first), it's simply a matter of when.
So we always like to give people the warning, sometimes they take our advice and separate their dragons immediately into temporary plastic tubs with clamp-lamps holding the basking bulb and the long tube fixture holding the UVB tube put across the top of the tub, until they can afford/have time to go and build/buy a second enclosure. Some people do some more research online and then choose to separate them, some people do a Google Image Search for "2 Bearded Dragons Housed Together" and then immediately separate them, and then there are the 50% or more of people who thank us for our time and then tell us that their 2 dragons are different, they get along just fine, they have been living together for a long time and they're used to each other; sometimes they go as far as telling us that they think separating their dragons would cause them to become depressed or suicidal, lol...either way, they refuse to separate their dragons...And inevitably they come back on the forum at some point in the future, either posting asking for help, that one of their dragon's has lost a lot of weight and is refusing to eat, sleeps all the time, etc. and they don't understand why since their other dragon who is housed together with the sick one is just fine, huge, and thriving, or they post in a frantic emergency, begging for help because they came home and found one of their dragons had been attacked by the other one and is badly bleeding, missing extremities or an eye, has a wound to their head and is acting like they can't see or move, etc. It's like they didn't hear a thing that anyone here said to them, and that makes you feel horrible, like you didn't do a good enough job telling this person what was going to happen if they didn't separate their dragons. It's exactly the same as telling someone who is using a loose substrate in the bottom of their dragon's tank, like calcium sand or crushed walnut shells, those are the 2 most deadly loose substrates by far, though they all can be deadly. People just shrug our advice about removing the loose substrate off, tell us that the loose substrate is not a problem for THEIR dragon, and then at some point in the future they come back on with a severely impacted dragon, or a dragon with an actual bowel obstruction, or a dragon with internal bleeding withing their GI Tract, etc....