We generally refuse to completely solve homework questions, like what you're asking us to do. I wrote out a few common reasons in this article, if you'd like to read it: http://cplusplus.com/articles/DjGEy60M/
Good luck with your problem, and no hard feelings. :)
But for different length strings, there's not enough information: are you counting the mismatches in the common prefix? (in which case you'd just use min(s1.size(), s2.size()) above). Are you looking for the substring in the larger string that would have the smallest number of mismatches with the smaller string? (more complicated algorithm). Are you looking for something else entirely?