Create a WP_Query where if the first value of the first row is equal to the second compare other value

You need to setup multiple meta_queries using an array. Since you didn’t have a value you were looking for I’m just making sure that thePrice and thePrice2 are not blank. I set each meta query to a variable and then used them in the main orderby statement with a space between them. I wasn’t able to do any testing on the code so if you have issues let me know.

<?php
$args = array(
    'post_type' => 'sn_dr_ia',
    'meta_query' => array(
        'relation' => 'OR',
        'thePriceValue' => array(
            'key'     => 'thePrice',
            'value'   => '',
            'compare' => '!='
        ),
        'thePrice2Value' => array(
            'key' => 'thePrice2',
            'value'   => '',
            'compare' => '!='
        )
    ),
    'orderby' => 'thePriceValue thePrice2Value',
    'order'   => 'ASC'
);

$query = new WP_Query($args);
?>

Here is a link to the codex for the syntax of the meta_query: https://codex.wordpress.org/Class_Reference/WP_Meta_Query