Looking to send notification A containing time helper and notification B if time was more than 2 hours ago

Please take a look at Asking Good Questions

The following is based on a lot of assumptions:

alias: Query-Alexa-Door Last Opened
sequence:
  - variables:
      last_opened: >
        {{ states('input_datetime.door_last_opened') | as_datetime | as_local }}
  - choose:
      conditions:
        - alias: "If door hasn't been opened in more than 2 hours"
          condition: template
          value_template: >
            {{ now() - last_opened > timedelta(hours=2) }}
      sequence:
        - service: notify.alexa_media_last_called
          data: 
            data:
              type: tts
            message: It's been more than 2 hours since the dog was taken out.
    default:
      - service: notify.alexa_media_last_called
        data:
          message: 'The door was last opened at {{ last_opened.strftime("%-I:%M %p") }}' 
          data:
            type: tts
mode: single