combing two codes in different loops

i need help to make the second loop works please.

#include <LiquidCrystal.h>
#include <Servo.h>
int angle = 0;
Servo servo_elbow;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int sensePin = A0;
int sensorInput;
int pbpin= 9;
int servoElbowpin= 10;
double temp;
int buttonState = 0;
void loop2 ();
void setup()
{
pinMode(pbpin, INPUT);
pinMode(13, OUTPUT);
servo_elbow.attach(servoElbowpin);
servo_elbow.write(0);
pinMode(13, OUTPUT);
pinMode(7, OUTPUT);
lcd.begin(16, 2);

Serial.begin(9600);
}

void loop()
{

lcd.setCursor(0, 0);

sensorInput = analogRead(A0);
temp = (double)sensorInput / 1024;
temp = temp * 5;
temp = temp - 0.5;
temp = temp * 100;

if (temp > 35)
{
digitalWrite(7, HIGH);

if (temp < 25 )
{

digitalWrite(7, LOW);
}

tone(8, 800, 300);
delay(250);

digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);

delay(500);
}

else if (temp > 25)
{
//INPUT - FREQUENCY - TIME THAT LASTS
tone(8, 500, 300);
delay(500);

digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
}
if (temp < 25 )
{

digitalWrite(7, LOW);
}

lcd.print("Temperature: ");

lcd.setCursor(0, 1);
lcd.print(temp);

lcd.print(" Celsius");

}
void loop2()

{
buttonState = digitalRead(10);

if (buttonState == HIGH)
{
servo_elbow.write(0);
delay(10000);
servo_elbow.write(180);
delay(10000);
servo_elbow.write(0);
}

delay(100);
}

delay(10000);

Oh dear. A 10 second period when nothing will happen, and there is a second one to go with it.

The first step in combining the 2 loops is to eliminate the delay()s in both of them by using millis() for timing,

See Using millis() for timing. A beginners guide, Several things at the same time and look at the BlinkWithoutDelay example in the IDE.

And when you finally replace all the delay () statements with timing with millis(), you'll need to call loop2() from loop().

void loop()
{
    loop2();
    ...
}

And then, when you come back with more questions, you'll have to put your code in code tags. You know, like it says in the Read this before asking a question sticky at the top of the forums.

you'll need to call loop2() from loop().

When you do that, it should be painfully obvious that loop2()( is a useless name.