Dan1 visited Dan2 on vacation.In the mornings,they both would go for workouts.In the evenings they would play tennis.To have more fun, they indulge only in one activity per day, i.e. either they went for workouts or played tennis each day.There were days when they were lazy and stayed home all day long.There were 24 mornings when they did nothing.14 evenings when they stayed at home, and a total of 22 days when they did workouts or played tennis.For how many days Dan1 stayed with Dan2?
Tennis ==> T/evening
Workout ==> W/morning
T + W = 22
x = nothing
24 mornings did nothing means ==> T + x = 24
14 evenings did nothing means ==> W + x = 14
T + W +2*x = 38 ==> 16 = 2*x ==> x = 8
Total stay = 22 + 8 = 30.