To calculate the area S1, you should use a numerical integration method or simply fit a curve on the TGA data and integrate the resultant equation. For this, you may use Table Curve or Matlab software.
For S2, it is a rectangular limited to T-Ti and Wf-W0, so the area is (T-T0)*( Wf-W0).