Let $R$ be a commutative Noetherian ring with non-zero identity, $\mathfrak{a}$ and $\mathfrak{b}$ proper ideals of $R$, $M$ a finitely generated $R$-module with finite projective dimension, and $X$ a finitely generated $R$-module. We study the cohomological dimensions of $M$ and $X$ with respect to $\mathfrak{a}+\mathfrak{b}$ and $\mathfrak{a}\cap\mathfrak{b}$. We show that the inequality $\operatorname{cd}_{\mathfrak{a}+\mathfrak{b}}(M,X) \leq\operatorname{cd}_{\mathfrak{a}}(M,X)+\operatorname{cd}_{\mathfrak{b}}(X)$ holds true and we find an equivalent condition for it to be equality.