Basically there's no need to worry that having the same song on two different computers will result in a duplication of songs in the cloud. It could happen but the circumstances are likely to be rare. If you bought the music from Apple or another online retailer (like Amazon) or if you ripped a CD and copied the ripped CD to the other computer, there's almost no chance you'll get a duplicate in the cloud.
For the curious....
If the song on your iMac came from one source and the song on your MacBook came from another, and if they were significantly different (by whatever metrics iTunes Match uses to match songs) it is conceivable that the two might get duplicated. The good news is you can look through your library once matching is finished and if you find dupes you can selectively delete them from the cloud (and computer).