First the fire :
If, just as a first approximation, we don't worry about a filled bucket being heavier to carry, what is the best point on the river bank for the fire-fighter to fill the bucket ?.
If you need to do a calculation with lengths, what measurements will you need to make from your diagram ?
It's a general solution you are looking for, so you may need two or three different arrangements or diagrams to see how the solution relates to the positions of the fire-fighter and the fire.
Now the keys :
Draw a horizontal line. Fix two pins at different horizontal levels above the line. A set of keys slides on a string and the string runs over those two pins (the pins are not directly underneath one another). Gradually let out the string length until the weight of the keys brings the string down to touch the drawn horizontal line.
Can you see the connection between this problem and the fire problem above ?