Let's start by calling your walking speed $W$ (in steps/s) and the escalator's speed $E$ (in steps/s).
You are walking on an escalator at the speed of 1 step/s and it takes 20 steps to reach the top.
Dividing the walked distance by the walking speed gives you the total time of the first trip: $20\ s$. We don't know the numerical distance the escalator traveled, but we do know abstractly that it travelled $(E\ steps/s)\cdot (20\ s)$ while you were walking $(1\ steps/s)\cdot (20\ s)$.
If you walk (on the escalator) at the speed of 2 steps/s, it takes a total of 30 steps to reach the top.
Total time for the second trip: $15\ s$. Once again we only know abstractly that the distance the escalator traveled was $(E\ steps/s)\cdot (15\ s)$ while you were walking $(2\ steps/s)\cdot (15\ s)$.
Now what? We know the total distance can be written up something like: $$ D_{total}=W\cdot t + E \cdot t $$
And, furthermore, because the total distance should be the same for both trips we can cancel that out as:$$W_1\cdot t_1 + E \cdot t_1 = W_2\cdot t_2 + E \cdot t_2$$
which can be solved for $E$ since we know the values for everything else.
$$(1\ steps/s)\cdot (20\ s) + E \cdot (20\ s) = (2\ steps/s)\cdot (15\ s) + E \cdot (15\ s)$$ $$E \cdot (5\ s) = 10\ steps$$ $$E = 2\ steps/s $$
We can then plug this $E$ result back into either trip's total-distance equation to find $D$.
$$D_{total}=(1 \ steps/s)\cdot (20\ s) + (2 \ steps/s)\cdot (20\ s)$$ $$D_{total}=60 \ steps$$
From there, you'll have $E$ and $D$ solved, and setting up the $W=3\ steps/s$ problem should be easy:
$$60\ steps=(3\ steps/s)\cdot (t_3) + (2 \ steps/s)\cdot (t_3)$$ $$t_3=12\ s \rightarrow (3\ steps/s)\cdot (12\ s)=36\ steps$$
The infinite limit question might seem tricky at first, but really it's just what happens when $W>>E$ and you end up walking "all the steps" before the escalator gets anywhere. Which is just $D_{total}$!