Lost need guidance

So here's the goal of the project. 3 different triggers in. 1 output. 1 of the inputs turns the outputs on for 5 seconds then turns it off. the other two turn the output on on as long as they are on either individually or together. I am very new to coding and Arduino and am hitting some bumps in the path. I am trying to adapt the delay file to test different times and theories. I don't know what code lines I'm missing to make the processor continually read for button pushes and not only read for button pushes in specific order.

Here's where I am at the moment. Using two different LED's for easy visual confirmation

void setup() {
pinMode(12, OUTPUT); // BLUE Output
pinMode(13, OUTPUT); // Green Output
pinMode(2, INPUT); // Button 1 Input
pinMode(4, INPUT); // Button 2 Input
}

void loop() {
int sensorValue = digitalRead(3);
while(digitalRead(2)==LOW);
digitalWrite(12, HIGH);
delay(5000);
digitalWrite(12, LOW);

while(digitalRead(4)==LOW);
digitalWrite(13, HIGH);
delay(2000);
digitalWrite(13, LOW);
}

while(digitalRead(2)==LOW);

Lines like the above simply block everything until a HIGH is read.

This is very poor programming practice, so take a look at the "blink without delay" example in the Arduino IDE, and "how to do several things at once" to learn about writing non-blocking code.