Look at the sample program that come as part of the IDE and see how they use the function millis(), which returns the current processor time in milliseconds.
The example called StateChangeDetect in the IDE will show you how to monitor a pin to see when it changes state, and when it goes high in your case, capture the current value of millis() into a variable. Start doing one of the things. Then use loop() to check to see if the ever-increasing new millis() has gone ahead of that captured value by 7 seconds. When it has, stop that thing and start the other one.
Question... does the thing that happens after 7 seconds ever turn off, like if the pin goes low again, or what?
Hello akib_rahman
It seems to be a school assigment, isn´t it?
Post your current sketch, well formated, with comments and in so called code tags "</>" and schematic to see how we can help.
Have a nice day and enjoy coding in C++.