The joke is a pun. A 'rational' number in mathematics is a number that can be a quotient of two integers with no repeating decimal.  Being 'rational' or speaking 'rationally' means to do so calmly and by thinking things through.
' ' It ' s the quotient of two integers , ' ' said Tom rationally .