It is possible to make a Text Widget that does simple math like adding two fields together. Connect your Text Widget to the Data you will be using and go to the Expression Tab to build your math formula. Here are some resources you may find useful for setting this up.
https://doc.arcgis.com/en/experience-builder/latest/configure-widgets/text-widget.htm
https://community.esri.com/t5/experience-builder-tips-and-tricks/working-with-dynamic-content-design...
It is also possible to build a limited amount of interactivity with a Dashboard through URL parameters. But interactivity can only be in one direction, from Experience Builder to the Dashboard.
All of the above can be done with the standard ESRI widgets and does not require any custom coding.
GIS Developer
City of Arlington, Texas