How to get child terms based on parent terms between two different taxonomies
You'll need to load your content's term references and then load those term entities so you can follow your chain of taxonomy terms. There's many ways to do that; taxonomy_term_load_multiple() is one such function.

$tids = array();

// @TODO: Use the $nid that corresponds with your node 
// @TODO: Replace field_program &amp; field_topic with your taxonomy ref field name
$node = node_load($nid);
foreach ($node-&gt;field_programs[LANGUAGE_NONE] as $term) {
  $tids[] = $term['tid'];
}
$programs = taxonomy_term_load_multiple($tids);

// @TODO: Iterate over $programs and retrieve 
// topic tid references from $program-&gt;field_topic[LANGUAGE_NONE]