Given series is $ S_n=5+55+555+...........$
Taking $5$ common we get
$S_n=5(1+11+111+..............)$
Multiplying and dividing by $9$ we get
$S_n=\large\frac{5}{9}$$(9+99+999+............)$
$\Rightarrow\:S_n=\large\frac{5}{9}$$\big[(10-1)+(100-1)+(1000-1).............\big]$
$\Rightarrow\:S_n=\large\frac{5}{9}$$\big[(10-1)+(10^2-1)+(10^3-1).............\big]$
$\Rightarrow\:S_n=\large\frac{5}{9}$$\big[(10+10^2+10^3+...........)-(1+1+1...........\big]$
$10+10^2+10^3+.........$ is a G.P with first term $a=10$ and common ratio $r=10$
Sum of $n$ terms of a G.P. $=a.\large\frac{r^n-1}{r-1}$
$\Rightarrow\:10+10^2+10^3+........=10.\large\frac{10^n-1}{10-1}$$=\large\frac{10}{9}$$(10^n-1)$
and
$1+1+1+.......=n$
Substituting the values in $S_n $ we get
$S_n=\large\frac{5}{9}\big[\frac{10}{9}$$(10^n-1)-n\big]$
$\qquad\:=\large\frac{5}{81}$$\big[10^{n+1}-10-9n\big]$