 
  
   
  
   
  
   
  
  $query = new WP_Query;
$j = 0;
$mainposts = $query->query( array(
  'cat' => '1'
) );
$otherposts = $query->query( array(
  'cat' => '2'
) );
foreach( $mainposts as $key->$mainpost ){
  echo '<div class= "item_"' . $key .  '>' . $mainpost . '</div>'
  if($key % 3 === 0 || $key === 1 && isset($otherposts[j])) {
    $j++;
    echo '<div class= "item_"' . $key .  '>'  . $otherposts[j] . '</div>'
  }
} 
  
   
  
  