How do I sum the discrete cosine transform cosine waves?
You used the DCT-II with a certain scaling convention:

$$X[k]=s[k]\sum_{n=0}^{N-1}x[n]\cos\left(\frac{\pi}{2N} (2n+1)k\right),\qquad k=0,1,\ldots,N-1\tag{1}$$

where $s[0]=1/\sqrt{N}$, and $s[k]=\sqrt{\frac{2}{N}}$ for $k=1,\ldots,N-1$. Its inverse is given by an appropriately scaled DTC-III:

$$x[n]=\sum_{k=0}^{N-1}s[k]X[k]\cos\left(\frac{\pi}{2N} (2n+1)k\right),\qquad n=0,1,\ldots,N-1\tag{2}$$

where $s[k]$ are the same scaling coefficients as used in $(1)$.

So, given the scaled DCT-II coefficients $X[k]$, the original signal can be written as

$$x[n]=\sqrt{\frac{2}{N}}\left[\frac{1}{\sqrt{2}}X[0]+X[1]\cos\left(\frac{\pi(2n+1)}{2N}\right)+X[2]\cos\left(\frac{\pi(2n+1)}{N}\right)+\ldots\right]$$