Showing featured image of page’s child’s children page

I created a solution through trial and error, unfortunately having to resort to custom fields. I added a custom field to every child element i wanted to display and used the code:

<?php
   $args = array(
      'post_type' => 'page',
       'meta_key' => 'xxxx',
       'meta_value' => 'xxxx'
    );


    $myPages = new WP_Query($args);
    while ($myPages->have_posts()) : $myPages->the_post(); 
       echo "$post->post_title";
       echo the_post_thumbnail();
    endwhile;

    wp_reset_postdata();
?>

This was done by navigating to the specific pages I want to display and creating a custom field, which adds meta data to the page.