I can provide more details about sales tax, Anoop.
Technically, there's no sales happened since you returned the payment. So that means, these transactions should not be included on your sales tax.
On your screenshot, you'll need to unchecked the tick-box under Tax column on the invoice. This way, QuickBooks won't calculate taxes, and the amount on the credit memo will match on the invoice.
Another option I can provide is to create the credit memo that is taxable as well. You'll want to create a credit memo with the same taxable amount with the invoice. By doing this, it'll automatically offset the taxes from the invoice.
Please let me know if you have other concerns.