The questions like homework are actually gets less answers than real questions...
if you have custom posts and you need filter them, you can use query_posts function of wordpress or get_posts... get_posts have args which helps you to query..
<?php
$args = array(
'posts_per_page' => 5,
'offset' => 0,
'category' => '',
'orderby' => 'post_date',
'order' => 'DESC',
'include' => '',
'exclude' => '',
'meta_key' => 'doctors_country',
'meta_value' => 'England',
'post_type' => 'doctors',
'post_status' => 'publish',
'suppress_filters' => true );
$posts_array = get_posts( $args);
?>
i hope this helps... you can do whatever you want with the array you have... IE: Triggering ajax request etc..
Solve one step and ask another question for next step..