A better check to do instead of comparing $pagetitle from the other answer, is to compare to the $this->template property. The page title is more dynamic so comparing that is more brittle (e.g. if you use a different language). $this->template will be 'questions' or 'hot' or 'unanswered' in your 3 situations specified.
And it's also better to specify the URL in the property $this->content['canonical'] and let the theme do the rest of the work (the canonical will be output in the head_links method).
Example code to go in the initialize function in your custom theme or layer override:
if ($this->template === 'questions') {
$this->content['canonical'] = qa_path_html('questions');
}
if ($this->template === 'hot') {
$this->content['canonical'] = qa_path_html('hot');
}
if ($this->template === 'unanswered') {
$this->content['canonical'] = qa_path_html('unanswered');
}