JSFiddle - React, Tailwind, and code Playground

HTML

Cantidad 1: <input type = "text" id = "a" value = 5 readOnly />
Cantidad 2: <input type = "text" id = "b" autofocus />
Resultado: <input type = "text" id = "c" readOnly />

CSS

input{
    display: block;
    width: 5em;
    text-align: center;
}

JavaScript

var a = document.getElementById("a"),
    b = document.getElementById("b"),
    c = document.getElementById("c");
 
b.addEventListener("keyup", function(){
    if (!isNaN(this.value))
        c.value = Number(a.value) + Number(this.value);
}, false);