is_page() and is_page_template() not being differentiated

Your code will never get to the is_page_template() if statement because is_page_template() can only be true when is_page() is also true.

It also looks like you’ve got some muddled elseif syntax (I think that’s what you want?) and some generally inefficient code that repeats a lot.

I’d do this:

<?php if( is_page_template('right-sidebar.php') ) { // check for page template
    $layout_classes="col-lg-7 col-md-12";
} elseif( is_single() || is_page() ) { // it's not the page template. Is it at least a post or page?
    $layout_classes="col-lg-8 col-lg-offset-2";
} else { // I suspect you want a fallback condition, not sure what it is.
    $layout_classes="{something}";
} ?>

<div class="col-lg-12">
    <div class="row">
        <div class="<?php echo $layout_classes; ?>">