We are sorry to hear about your problem. However, that is not an easy question to answer. The discovery of such an item four years after the sale is problematic. There are several issues to consider:
You should have received a copy of a termite inspection report when you purchased four years ago. Did it mention any problems at that time? But please bear in mind that even the best termite inspector cannot see behind or through the walls. The inspector should have flagged any visible signs of wood rot, termite damage, as well as previous or current termite activity, if any.
You may have obtained a home inspection prior to closing. but as in the case of the termite inspector, they cannot see behind or through the walls. Their disclaimers will typically state that the inspection is non-invasive in nature and that the inspector is only responsible for detecting that which is visually and readily observable.
Another issue is that this previous damage may have even been covered up by a seller prior to the one who sold to you. If the property has been through several owners, your seller may not have been aware that a pre-existing problem existed. The origin may be very difficult to determine.
If the problem is severe, you may wish to contact an attorney to see what your legal rights may be.