Let's say that x is the amount of time they paint in any given period.
Therefore:
x/5 is the fraction of the room Sally can paint in a given time period.
x/9 is the fraction of the room Steven can paint in the same time period.
A whole room means the equation equals...1
[our working equation] x/5 + x/9 = 1
[solve for x]
[find the common denominator] 9x/45 + 5x/45=1
[add the fractions] 14x/45 = 1
[isolate the variable] 14x=45
x=45/14, or 3 3/14 hours. It would take them 3 3/14 hours to paint the room together. (That's about 3 hours, 12 minutes, and about 52 seconds :-))