Calculation is not working with custom Cell Rendering

In my table I have four columns Cars, A, B and C
Data for Cars and A columns are loaded from MySQL database. (like PHP Demo).

Data of Column B is populated from MySQL database via AJAX depending on the value of Cars. The code is as follows:

{type: { renderer : function (instance, TD, row, col, prop, value, cellProperties) {
				Handsontable.TextCell.renderer.apply(this, arguments);
				var cr,prc;
				cr = instance.getDataAtCell(row, 0);
				prc = instance.getDataAtCell(row, 1);
				$.ajax({
					url: "php/act-go-t.php",
					data: {cars: cr, price: prc}, 
					dataType: 'json',
					type: 'POST',
					success: function (res) {
						if (res.result[0].tax === null) {
							TD.innerHTML = '0.000';
							}
							else {
							TD.innerHTML = res.result[0].tax;
							}
						},
						error: function () {
						TD.innerHTML = '0.000';
						}
					});	  				
				}}}

The C column is the SUM of A and B and the code is:

{type : { renderer : function (instance, TD, row, col, prop, value, cellProperties) {
					Handsontable.TextCell.renderer.apply(this, arguments);
					var a,b;
					a = instance.getDataAtCell(row, 1);
					b = instance.getDataAtCell(row, 2);    					
					TD.innerHTML = +a + +b;
				}}}

The problem is although the value is loaded in B but the addition is not working. If I set the type of B column to numeric({type: numeric}) except the AJAX, the addition is working fine.

Result with AJAX:

+----------+------+-------+--------------+
| Cars     |   A  |    B  |            C | 
+----------+------+-------+--------------+
| Nissan   |   20 |    10 |          20  |  
| Honda    |    5 |     6 |           5  |    
+----------+------+-------+--------------+

Result without AJAX:

+----------+------+-------+-------------+
| Cars     |   A  |    B  |           C |
+----------+------+-------+-------------+
| Nissan   |   20 |    10 |         30  |  
| Honda    |    5 |     6 |          11 |    -
+----------+------+-------+-------------+

Can anybody please tell me if I am missing something?

I find that TD.innerHTML is only for displaying data, however it not inserts data into datamap.
I tried instance.setDataAtCell(row,col,tax); where tax = +a + +b; but I get some error like Cell type must be a string .

I try to solve it by assign a id to the cell and get the value by the id and summing over them, but I am not satisfied with that as it will not save the value to the database. My New codes are as follows:

{type: { renderer : function (instance, TD, row, col, prop, value, cellProperties) {
                Handsontable.TextCell.renderer.apply(this, arguments);
                var cr,prc;
                cr = instance.getDataAtCell(row, 0);
                prc = instance.getDataAtCell(row, 1);
                $.ajax({
                    url: "php/act-go-t.php",
                    data: {cars: cr, price: prc}, 
                    dataType: 'json',
                    type: 'POST',
                    success: function (res) {
                        if (res.result[0].tax === null) {
                            TD.innerHTML = '0.000';
                            TD.id = row+'_'+col;
                            }
                            else {
                            TD.innerHTML = res.result[0].tax;
                            TD.id = row+'_'+col;
                            }
                        },
                        error: function () {
                        TD.innerHTML = '0.000';
                        TD.id = row+'_'+col;
                        }
                    });                 
                }}}

And

{type : { renderer : function (instance, TD, row, col, prop, value, cellProperties) {
                    Handsontable.TextCell.renderer.apply(this, arguments);
                    var a,b;
                    a = $('#'+row+'_1').text();
                    b = $('#'+row+'_2').text();                     
                    TD.innerHTML = +a + +b;
                }}}

Hi @dassoubarna
Actually we leave all back end operations for developers but if I can help please give me a hint.