The answer can be found here under 1.3) Random Walk Hitting Probabilities (when events have equal probability of $\frac{1}{2}$ each).
\begin{equation}
p(a) = \frac{b}{a+b}
\end{equation}
$p(a)$ would be the probability of take-profit hit first. To look at probability of stop-loss being hit first, just take 1 minus the above, resulting with $a$ on the top (where $a$ is take profit and $b$ is hit stop loss level, respectively).
You can run this script I wrote in R, to verify:
tw<-0; d<-function() sample(c(-1,1),size=1)
#x=sl; y=tp
walk<-function(x,y){
for(i in 1:1000){
tw<- sum(tw+d())
if(tw== x || tw==y) break()}
return(tw)}
sl<- -10; tp<- 20
res<-replicate(1000,walk(sl,tp))
resx<-length(res[res==sl])
resy<-length(res[res==tp])
resx/(resx+resy)
Result for hitting x (stop loss first, where x= -10) is
resx/(resx+resy) = 0.673716
while, tp/(tp+stop) = 20/(20+10) gives 0.6666667, in agreement.