Answer:
Step-by-step explanation:
The following code is written in Python and creates the function as requested in the question...
def phone2address(phonebook, addressBook, friendName):
phoneNumber = phonebook.get(friendName)
address = addressBook.get(phoneNumber)
return address
The function uses the dictionary (phonebook) to look for the friendName input as the key and then saves the phone number attached to that name in a variable called phoneNumber. Then we use that variable to search the addressBook dictionary to find the associated address and save it to the address variable. Finally, we return that address.