I think you owe taxes even if you gave it to your mother
Tha capital gain is taxed when you "dispose of" a property, that is, when you get rid of it, not just when you sell it. So you owe taxes as long as the ownership of the house changed. You owe taxes when (1) you sold the house; (2) give the house to your mother.
So I think giving the money to your mother then have her send it to you will not avoid any tax liability, but it is possible to create new tax liability such as gift tax.