What is the probability to get $5$ correct numbers of a $7$-digit number from either the left side or right side? What is the probability to get $5$ correct numbers of a $7$-digit number from either the left side or right side? 
For example: The correct number is $1234567$, the number $**34567$ and $12345**$ have both $5$ correct numbers. 
How should I go about this problem? For example if we want $6$ correct numbers we know that the first and last numbers can be wrong in 9 ways, that makes 18 in total which makes the probability to have $6$ correct answers $\frac{18}{10^7}$. 
Also what is the probability to get at least two numbers right? My attempt:
There are a total of $10^7$ combinations, if at least two right then two numbers in the begining and end $10^5$ combinations and $10^3$ where both the two first and the two last are correct, that makes $10^5+10^5-10^3$ combination for at least two correct numbers. Is this right?
 A: There are $100$ numbers that have at least five of the seven left digits correct.
It's the same for the five of seven from the right.
The correct number (all seven digits correct) is in both groups, so take that one out:  $199$ left.
Then, take out the nine cases for which there are exactly six of the seven left digits correct.  (The sixth digit is correct, but the seventh is incorrect.)
Same for the right case.  So we're left with $199-18 = 181$ cases for which exactly the first five or exactly the last five digits are correct.
Divide by $10^7$ and we're done:  $0.0000181.$
A: If none of the 7 digits is repeated, it is $\frac{7P_5}{2}.$
A: Let $A$ be the event the first $5$ are correct and the last $2$ are wrong. Let $B$ be the event the first $2$ are wrong and the last $5$ are correct. We want $\Pr(A\cup B)$. The events $A$ and $B$ are mutually exclusive, so $\Pr(A\cup B)=\Pr(A)+\Pr(B)$.
The probability of $A$ is $(1/10)^5(9/10)^2$, and so is the probability of $B$. Add. We get $1.62\times 10^{-5}$.
Edit: We answer your added question about the probability of at least $2$ right. This is $1-p$, where $p$ is the probability of getting $0$ or $1$ right.
The probability of $0$ right is $(9/10)^7$, mistakes all the way. For the probability of $1$ right, note that the probability the first is right and therest wrong is $(1/10)(9/10)^6$. But we can also get exactly one right by having the second right and the rest wrong. This also has probability  $(1/10)(9/10)^6$. We find in this way that the probability of exactly one right is $7(1/10)(9/10)^6$. So $p=(9/10)^7+7(1/10)(9/10)^6$.
