ABSTRACT The gas content of galaxies is a key factor for their growth, starting from star formation and black hole accretion to galaxy mergers. Thus, characterizing its properties through observations of tracers like the CO emission line is of big importance in order to understand the bigger picture of galaxy evolution. We present Atacama Large Millimeter/submillimeter Array (ALMA) observations of dust continuum, CO(5–4) and CO(8–7) line emission in the quasar–star-forming companion system SMM J04135+10277 (z = 2.84). Earlier low-J CO studies of this system found a huge molecular gas reservoir associated with the companion galaxy, while the quasar appeared gas-poor. Our CO observations revealed that the host galaxy of the quasar is also gas-rich, with an estimated molecular gas mass of $\sim (0.7{\!-\!}2.3)\times 10^{10}\, \rm M_{\odot}$. The CO line profiles of the companion galaxy are very broad ($\sim 1000\, \rm km\, s^{-1}$), and show signs of rotation of a compact, massive system. In contrast to previous far-infrared observations, we resolve the continuum emission and detect both sources, with the companion galaxy dominating the dust continuum and the quasar having a $\sim 25{{\ \rm per\ cent}}$ contribution to the total dust emission. By fitting the infrared spectral energy distribution of the sources with mr-moose and empirical templates, the infrared luminosities of the quasar and the companion are in the range of $L_{\rm IR, QSO}\sim (2.1{\!-\!}9.6)\times 10^{12}\, \rm L_{\odot}$ and $L_{\rm IR, Comp.}\sim (2.4{\!-\!}24)\times 10^{12}\, \rm L_{\odot}$, while the estimated star formation rates are $\sim 210{\!-\!}960$ and $\sim 240{\!-\!}2400\, \rm M_{\odot }\, yr^{-1}$, respectively. Our results demonstrate that non-detection of low-J CO transition lines in similar sources does not necessarily imply the absence of massive molecular gas reservoir but that the excitation conditions favour the excitation of high-J transitions.