Ramping up and down arduino motor due to ultrasonic sensor input
The speed seams to be defined by a an analog write to SpRMotor and SpLMotor. You did that once (with value 170)  in the setup. If you use variables for that (e.g. speedValueL and speedValueR) you can change their values as you need it and write it to the PWM channels on each forward, backward, left or right statement.

A short example:

int SpRMotor = 5;  //speed Right Motor
int MotorA1 = 7; //Right Motor = +
int MotorA2 = 6; //Right Motor = -
int MotorB1 = 8; //Left Motor = -
int MotorB2 = 9; //Left Motor = +
int SpLMotor = 10;  //speed Left Motor

int TriggerPIN1 = 3;//right
int EchoPIN1 = 2;
int TriggerPIN2 = 12;//left
int EchoPIN2 = 11;

int speedValueL = 0;
int speedValueR = 0;

void setup()
{
  pinMode(TriggerPIN1,OUTPUT);
  pinMode(EchoPIN1,INPUT);
  pinMode(TriggerPIN2,OUTPUT);
  pinMode(EchoPIN2,INPUT);

  pinMode(MotorB1, OUTPUT);
  pinMode(MotorB2, OUTPUT);
  pinMode(MotorA1, OUTPUT);
  pinMode(MotorA2, OUTPUT);
  pinMode(SpLMotor, OUTPUT);
  pinMode(SpRMotor, OUTPUT);

  analogWrite(SpRMotor, speedValueR);
  analogWrite(SpLMotor, speedValueL);

  Serial.begin(9600); 
}

void loop()
{  
  int limit;
  int sampledata1, sampledata2;
  sampledata1 = distance(TriggerPIN1, EchoPIN1);
  Serial.print("distance1: ");
  Serial.print(sampledata1);
  delay(100);
  sampledata2 = distance(TriggerPIN2, EchoPIN2);
  Serial.print(" distance2: ");
  Serial.println(sampledata2);
  delay(100);
  limit = 10;
  if( (15&gt; sampledata1 &gt;= limit) &amp;&amp; (15&gt; sampledata2 &gt;= limit) )
  {
    Serial.print("True");
    // Just my guess - do what fits for you
    speedValueL = 170;
    speedValueR = 170;

    forward();
    delay(100);
  }

  if (sampledata2  &gt;= 15 )
  {
    // Just my guess - do what fits for you
    speedValueL = 200;
    speedValueR = 0;

    turnRight();
  }

  if (sampledata1  &gt;= 15 )
  {
    // Just my guess - do what fits for you
    speedValueL = 0;
    speedValueR = 200;

    turnLeft();
  }

  if ( ( limit &gt; sampledata1 ) &amp;&amp; ( limit&gt; sampledata2 ) )
  { 
    // Just my guess - do what fits for you
    speedValueL = 0;
    speedValueR = 0;

    Stop();
  }
}

void forward()
{
  analogWrite(SpRMotor, speedValueR);
  analogWrite(SpLMotor, speedValueL);

  digitalWrite(MotorA1, LOW);
  digitalWrite(MotorA2, HIGH);
  digitalWrite(MotorB1, HIGH);
  digitalWrite(MotorB2, LOW);  
}


void turnRight()
{
  analogWrite(SpRMotor, speedValueR);
  analogWrite(SpLMotor, speedValueL);

  digitalWrite(MotorA1, LOW);
  digitalWrite(MotorA2, LOW);
  digitalWrite(MotorB1, HIGH);
  digitalWrite(MotorB2, LOW);  
}

void turnLeft()
{
  analogWrite(SpRMotor, speedValueR);
  analogWrite(SpLMotor, speedValueL);

  digitalWrite(MotorA1, LOW);
  digitalWrite(MotorA2, HIGH);
  digitalWrite(MotorB1, LOW);
  digitalWrite(MotorB2, LOW);
}


void Stop()
{
  analogWrite(SpRMotor, speedValueR);
  analogWrite(SpLMotor, speedValueL);

  digitalWrite(MotorA1, LOW);
  digitalWrite(MotorA2, LOW);
  digitalWrite(MotorB1, LOW);
  digitalWrite(MotorB2, LOW);
}

int distance( int trig, int echo )
{ 
  digitalWrite( trig, LOW );
  delayMicroseconds( 2 );
  digitalWrite( trig, HIGH );
  delayMicroseconds( 10 );
  digitalWrite( trig, LOW );
  long timedelay = pulseIn( echo, HIGH );
  int distance = 0.0343 * ( timedelay / 2);

  return distance;
}