How do I modify my code?

This is my current code:

boolean buttonpush=0;
void setup() {
Serial.begin(9600);
pinMode(7,INPUT_PULLUP); // button circuit will be read here
pinMode(5,OUTPUT); // connected to red LED
}
void loop() {
while(digitalRead(7)==HIGH){
}
buttonpush=!buttonpush;
digitalWrite(5,buttonpush);
delay(200);
}

how do I modify it so it performs this function: modify the circuits and code such that pushing the button switches, in order, from 1) the red LED turning on, 2) a yellow LED ALSO turning on, and 3) both LEDs turning off.

Is this a homework question? It is certainly worded that way. We will only do your homework for you if you provide the name of your school and the name and email of the teacher so we can ask any questions we might have about the assignment we are doing.

It would probably also help your cause if you took the time to read the forum rules "How To Use This Forum" and learned to post your code correctly. Your code should be properly formatted (Control_T in the IDE) and posted in code tags.

When is our homework due?

To modify your code it’s necessary to ‘open’ it in the IDE/ development environment of your choice - or a simple text editor.

Then you can use the normal type/delete and move functions to reposition the text & commands as needed.
When it looks the way you are hoping, run it past the compiler - which will validate your syntax and structure.

After uploading to your device, the code may or may not run.
That’s where testing and debugging come in, and you will probably havee to review the code for bugs, and repeat the process.

Google "state machine", read some example sketches until you grab the principle, continue from there