Years ago I took in a rescue (sick & unwanted) bearded dragon- if I got near his tank while holding an adult snake, he definitely went on the defensive, but by the same token, a good-sized bearded dragon will eat a baby snake in the wild. So either way, they don't mix well, but as long as they're not close to each other in the same room, it's just fine. Give them at least 6' apart, more if you can, & you can also block their view by covering one side of the tank.
Please do lots of reading on bearded dragons though, before you're "dragon" one home-they're labor-intensive & need daily care, unlike snakes.