Go to Valentine’s office back in Diamond City. You’ll receive some bonus caps for rescuing Nick. Sit down and describe all the details to Nick. Continue giving Nick the details he need. Once done, follow him as you head over to Kellogg’s last address.
Head over there and Valentine will try to pick the lock. The lock is Master difficulty so unless you can pick that kind of lock, you’ll have to get to the lift marked in the quest marker and use it to reach the mayor’s office.
You’ll find Piper there as well berating with the secretary. Once she leaves, talk to Geneva. She’ll inform you that you can talk to the mayor about the keys of the properties seized by the government. You can bribe her or try to persuade her using Charisma speech checks. Once you successfully persuaded her, grab the key and return to Kellogg’s house. Use the key to enter the house.
Search the button under the desk and press it to reveal a hidden room. Examine the cigars on the table. Nick will suggest using Dogmeat to track Kellogg by letting him sniff the cigar. Also, you’ll get the chance to invite Nick as a new companion.
In case you left Dogmeat in one of your settlements, you don’t need to fetch him; he’ll be right outside the house. Show him the cigar and follow him. The quest will be complete and will be followed up immediately by the next quest.