JSFiddle - React, Tailwind, and code Playground

HTML

<span class="woocommerce-Price-amount amount">
<span class="final-sum">3</span>&nbsp;
  <span class="woocommerce-Price-currencySymbol">
    <span class="rur">
      р
      <span>
        уб.
      </span>
    </span>
  </span>
</span>

<input type="number" class="qty" step="1" min="1" max="" name="quantity" value="1" title="Кол-во" size="1" pattern="[0-9]*" inputmode="numeric">

<br><br><div class="xbox">3</div>

JavaScript

$(".qty").on('keyup change',function(){

	 var quantity = parseInt($(".qty").val());
	 var x = parseInt($(".xbox").text());

  // var quantity = parseInt($(this).val());
   var newPrice = x*quantity;
   $(".final-sum").text(newPrice);
});