Button set ping high for a set time


I'm a beginner at this and have probably a stupid question, but I hope someone will help me.

I'm trying to make two pins go high at the push of a button (with some delay between them) and stay high for a set (but different) amount of time, and then go back to low.

Lets say I push the button - first one pin goes high, and then 5 seconds later the second pin goes high.
after 20 seconds the second ping goes low, and the first pin goes low 5 seconds later.

this should happen each time I push the button.

Can anyone please help me?

You have to remember the time when the button was pressed. Then compare it to the current time, until the time elapsed when the next change (LED on or off) should happen. See the BlinkWithoutDelay example, and add further comparisons with your desired interval times.