azmin decided to get some exercise by taking the stairs from the first to the fifth floor in her apartment building. The first time she went up the entire flight, she walked up some steps and ran up 16 steps. This took a total of 60 seconds.

The second time she went up the entire flight, she walked up some steps and ran up 28 steps. This took a total of 42 seconds. How long would Yazmin take if she walked up the entire flight of steps? (You may assume constant rates for walking and running.)

let the total number of steps be x

rate of walking --- w steps/sec
rate of running --- r steps/sec

first time:
steps running = 16
steps walking = x-16
16/r + (x-16)/w = 60
times rw
16w + r(x-16) = 60rw
16w + rx - 16r = 60rw
x = (60rw - 16w + 16r)/r

2nd time:
steps running = 28
steps walking = x-28

28/r + (x-28)/w = 42
28w + r(x-28) = 42rw
28w + rx - 28r = 42rw
x = (42rw - 28w + 28r)/r

(60rw - 16w + 16r)/r = (42rw - 28w + 28r)/r
times r
60rw - 16w + 16r = 42rw - 28w + 28r
18rw + 12w = 12r
w(18r + 12) = 12r
w = 12r/(18r + 12) = 2r/(3r+2)

x = (60rw - 16w + 16r)/r
= 60w - 16w/r + 16
= 60(2r/(3r+2) - 16(2r/(3r+2) (1/r) + 16
= 120r/(3r+2) - 32r/(r(3r+2)) + 16
common denominator is r(3r+2)
= (120r^2 -32r + 48r^2 +32r)/(r(3r+2))
= 168r^2/(r(3r+2))
= 168r/(3r+2)

since x is the number of steps, x must be a whole number
so we need a value of r which makes x a whole number.
Also we know that x > 28
That is tricky.

I actually made up a little computer program and got the following:
if r = 2, x = 42
if r = 4 , x = 48
if r = 18, x = 54
as r got bigger, x got close to 56, but no whole number of x
also,
if r = 1.2, x = 36
if r = 6.8, x = 51

let's take one of these and test them:
if r = 4, then w = 8/14 = 4/7 , x = 48
check in "first time"
16/4 + 32/(4/7)
= 4 + 56 = 60 , yeah
So if she walked all 48 steps, it would take
48/(4/7) sec or 84 seconds

let's try another, how about one of the decimal values:
r = 1.2, w = 2(1.2)/(3(1.2) + 2) = 3/7 , x = 36
check in "2nd time"
28/1.2 + 8/(3/7)
= 70/3 + 56/3
= 42 , that worked !!!!
So if she walked all 36 steps, it would take
36/(3/7)sec or 84 seconds

So you can see that the solutions are not unique
but we appear to get 84 seconds if she walked the whole stairway

I sure hope there is an easier way of doing this. The problem is that once your mind is locked in on a method, you tend to stick with that method

To find out how long it would take Yazmin to walk up the entire flight of steps, we need to determine the number of steps she walks and runs separately, and then calculate the time for each scenario.

Let's assume that the total number of steps in the entire flight is "x".

In the first scenario, Yazmin walked up some steps and ran up 16 steps, taking a total of 60 seconds.

This means that the time taken to walk up some steps is 60 seconds minus the time taken to run up 16 steps.

In the second scenario, Yazmin walked up some steps and ran up 28 steps, taking a total of 42 seconds.

This time, let's call the time taken to walk up some steps "t" (in seconds). The time taken to run up 28 steps is 42 seconds minus "t".

Since both scenarios involve walking up the entire flight of steps, the number of steps walked in each scenario must be the same.

Setting up the equation:
60 - t = 42 - t + 12

Solving the equation:
60 - 42 = t - t + 12
18 = 12

Since the equation is inconsistent and doesn't have a solution, we cannot determine how long Yazmin would take if she walked up the entire flight of steps with the given information.