In your previous post, it appears you're modeling the effect of firm mergers on profitability. The "timing" of the mergers happen in different years, so the interaction term is not well-defined. However, a single dichotomous treatment variable that 'turns on' (i.e., switches from 0 to 1) for the treated firms in their respective post-treatment years is sufficient. It is the interaction term just defined in a different way. I go into great detail on how to code this type of policy/treatment variable here.
The "generalized" difference-in-differences equation below is not much different than the one you outlined above, but it's a bit more explicit in my estimation:
$$
\mathit{Profit}_{it} = \gamma_i + \lambda_t + \delta \mathit{Merger}_{it} + \theta \mathit{Employees}_{it} + e_{it},
$$
where we regress profits on a full set of firm effects $\gamma_i$, a full set of year effects $\lambda_t$, and a dichotomous treatment variable $\mathit{Merger}_{it}$. The variable $\mathit{Employees}_{it}$ is a time-varying covariate and is appropriate to include in this setting. If you have a lot of covariates, then include $X_{it}$ and say it's a vector of potentially time-varying firm level characteristics. However, if you're only adjusting for employees, then writing it out explicitly won't eat up too much space.
...I don’t know how to add the interaction terms and how many error and/or terms for fixed variables needs to be included (especially regarding the term i.year).
It's sufficient to use "parameters" to denote the fixed effects. You do not need to write out some complicated error structure. Including $\lambda_t$ is mathematical shorthand; it's telling your audience that you included a full set of year dummies on the right-hand side of your equation. Since you're only working with a finite number of years, you're actually adjusting for the time shocks directly.
Note, the estimate of $\delta$ is a single summary measure of the treatment effect. It's also commonly referred to as a static treatment effect. But is one coefficient sufficient to explain the effect of mergers on profits? Do you suspect some sort of dynamic response in the post-merger era? Some authors write out the different leads and lags of $\mathit{Merger}_{it}$ using dummy variable notation, others just include the base model and build upon it later when they present their regression results. It depends on how fancy you want to get.
Specifying a difference-in-differences equation with "interaction terms" to show how the treatment varies with the time since the first merger is a bit more difficult. A review of your Stata code suggests you want to estimate an "event study" model. The specification below seems appropriate:
$$
\mathit{Profit}_{it} = \gamma_i + \lambda_t + \sum^{-q}_{\tau = m} \delta_{\tau} \cdot M_i \cdot \textbf{1}(t - T_i = \tau) + \theta \mathit{Employees}_{it} + e_{it},
$$
where we introduce a variable $M_i$, which is set to 1 if a firm has ever merged, 0 otherwise. Note the subscript $i$; it does not vary over time. To obtain estimates before and after a merger, we interact $M_i$ with the "event time" indicator function $\textbf{1}(t - T_i = \tau)$, which is set to 1 if the observation time is $\tau$ = $-q...,0,...m$ years from $T_i$, the first merger year for firm $i$. You can think of this computation as centering all firms around that first merger year.
The model you specified in your post seems okay to me. Just be very clear about what your variables represent.