Unfortunately, without the specific dimensions or values given for the sides of the rectangle or triangle, I am unable to calculate the exact length of the diagonal AB. If you provide the necessary information, I would be happy to assist you further.