Three's a charm: The pair also recorded tracks All Day and Only One, as well as hit song FourFiveSeconds with Rihanna