JSFiddle - React, Tailwind, and code Playground

HTML

<form id="percentageBiz" method="post">
<input type="radio" id="sum1" > Name 
<input type = "text" id="value1"> <br>
<input type="radio" id="sum2"> Lastname
<input type = "text" id="value2"> <br>
<input type="submit" onclick="return total()" value="Get Total">
<p style="font-size:80%;">  <span id='boldStuff1'> </span> <span id='boldStuff2' > </span>  </p>
</form>
    <div id="display" style="height: 50px; width: 100%;"></div>

JavaScript

function total(){
    var a = document.forms["percentageBiz"]["value1"].value;
    var b = document.forms["percentageBiz"]["value2"].value;
    //alert(a+b)
    var display=document.getElementById("display")
    document.getElementById('boldStuff1').innerHTML= " Name is " + a ;
    document.getElementById('boldStuff2').innerHTML= " Lastname is " + b ;
    return false;
}