For a diatomic molecule, the three translation direction contribute 1/2 kT per molecule, and for each molecule there are also two axes of rotation, contributing rotational kinetic energy in the amount of 1/2 kT each.
So total translational kinetic energy =(3/2)kT & total rotational kinetic energy =(2/2)kT.
So, the ratio of average translational kinetic energy to rotational kinetic energy of a diatomic molecule at temperature T is (3/2).
So sum of ratio is 3+2 = 5