EDITED
Thank you for everyone who offered support... the best working script I will share with you in hope that I could help others who is looking f
use val() instead of text() for input element, use $(function(){}) to wait DOM is ready. And also don't use same ID to elements.
val()
text()
$(function(){})
price1 price2 rate%