If you light both ends of one rope, it will burn in exactly a 1/2 hour. Thus, burn one rope
from both ends and the other rope from only one end. Once the one rope (which is burning
from both ends) finally burns out (and you know a 1/2 hour has elapsed), you also know that
the other rope (which is burning from only one end) has exactly 1/2 hour left to burn. Since
you only want 45 minutes, light the second end of the rope. This remaining piece will burn in
15 minutes. Thus, totaling 45 minutes.