How to get specified parent page title in my function

Use get_the_title

Replace the last part of code

if ( $childpages ) {
        $result="<h2>" . 'Parent title here' . '</h2>' . 
            '<ul>' . $childpages . '</ul>';
    }

with

if ( $childpages ) {
        $result="<h2>" . get_the_title( $parent_id ) . '</h2>' . 
            '<ul>' . $childpages . '</ul>';
    }

This may also help.