Question 696188
Let x=amount of time it takes John, working alone, to hang the wallpaper
Then John works at the rate of 1/x room per hour
Let y=amount of time it takes Fred, working alone, to hang the wallpaper
Then Fred works at the rate of 1/y of the room per hour
John and Fred, working together, work at the rate of 1/8 room per hour
Soooo
1/x + 1/y =1/8-------------eq1
5*(1/x)+7*(1/8)=1(1 completed room, that is)----eq2

Solve eq 2 for x and substitute into eq1
5/x +7/8=1  multiply each term by 8x
40+7x=8x
x=40 hours-----Time it takes John working alone
From eq 1
1/40+1/y=1/8  multiply each term by 40y
y+40=5y
4y=40
y=10 hours time it takes Fred working alone

CK
1/40 +1/10=1/8 
1+4=5
5=5
another way
In 5 hours, John completes (1/40)*5=1/8 of the room
In 7 hours, Both, working together, completes (1/8)*7=7/8 of the room
7/8+1/8=8/8=1 room
Hope this helps---ptaylor