I do not see the rules that allow you to do that. The relevant text describing the addition of wizard spells to your spell book (box "Your spell book", PHB p.114) says:
Copy a spell in the book. When you find a level 1 or higher wizard spell, you can add it to your spell book if you have a level that you can prepare and you have time to decipher and copy it.
So the question is to know, for example, detect the magic as a Druid means you have "found a wizard spell"? I do not really think so. Look at the examples that he gives:
You may find other spells during your adventures. You might discover a spell saved on a parchment in the trunk of an evil wizard, for example, or in a dusty book from an old library.
It seems to me that the word "find" here means a physical thing that you go, like, and find. And look How? 'Or' What you copy it into your spell book:
Copying this spell into your spell book involves reproducing the basic form of the spell and then deciphering the unique scoring system used by the wizard who wrote it.
It seems to me that you need a written reference to copy it. Preparing a Druid spell has nothing written for you.
The other option you can consider, which costs only 10 inches per level, seems even clearer to me than you can do (my emphasis is added):
You can copy a spell from your own spell book in another book, for example, if you want to make a backup copy of your spell book. It's like copying a new spell into your spell book, but faster and easier, since you understand your own notation and already know how to cast the spell. You only need to spend 1 hour and 10 inches for each level of the copied spell.
Now, if your DM reads it differently, or just thinks it makes more sense or is more fun or anything and wants to allow it, I certainly could not blame them. But I just do not see it allowed by the text I see.