how can i do something like shazam in mit app inventor
What's a shazam?
It's an app that recognizes music using a microphone. After recognition, it gives the title, artist and link to the song, e.g. in Spotify.
I think so, as long as you have such a large database of music to compare and you create the right comparison algorithms. Shazam is not just an app, they have their own server that does all the work.