<?php
$str = '1377847,...,1447961';
$str = explode(',',$str);

$first = $str[0];
$third = trim($str[2]);
$diff = $third - $first;
$second = $first + $diff;
print_r($second);