How do i make a add(a)button+(b)button=c button(result)

i am making a game based on chemical elements.such as when i click on chemical(a) and chemical(b).i want the answer as chemical(c).or if i have multiple chemicals and i want to know to make it inside the widget would be great if someone can help me or post a video about this on youtbe