In two different solutions I see people use the principle that $\liminf (f_n+g_n)=\liminf f_n + \liminf g_n$.
Showing $\int_E f=\lim_{n\to\infty}\int_E f_n$ for all measurable $E$
Limit of Integral over Any Measurable Subset Exists
However, I thought this was supposed to be an inequality rather than an equality. That is to say, I thought that we could only say
$$\liminf(f_n+g_n)\ge \liminf f_n + \liminf g_n$$
We do have that $f_n$ is nonnegative and $g_n$ is nonpositive, but I don't know how this would make the principle valid. Am I misunderstanding something, or is there a special condition being met which ensures equality?
You are right; it's only an inequality; for instance, take $f_n=(-1)^n$ and $g_n=(-1)^{n-1}$. Note that, in the second of the questions to which you have posted a link, one of the sequences converges, and, in that case, we have an equality. I don't see the equality in the first question.