Given,
In right $\vartriangle ABC,\angle B={{90}^{\circ }}$
And, $BC=6cm,AB=8cm$
Let us consider, r be the radius of incircle with centre O and touches the sides AB, BC and CA at P, Q and R respectively.
as we can see, AR and AP are the tangents to the circle AR = AP
same above, $CR=CQ$ and $BQ=BP$
The radius of the circle are OP and OQ
$OP\bot AB$ and $OQ\bot BC$ and $\angle B={{90}^{\circ }}$ (given in the question)
Hence, BPOQ is a square
Thus, $BP=BQ=r$ (All four sides of a square are equal)
So,
$AR=AP=AB-PB$
$=8-r$
and $CR=CQ=BC-BQ$
$=6-r$
But $A{{C}^{2}}=A{{B}^{2+}}B{{C}^{2}}$ (Pythagoras Theorem applied)
$A{{C}^{2}}={{(8)}^{2}}+{{(6)}^{2}}$ $$
$A{{C}^{2}}=64+36$
$A{{C}^{2}}=100$
$A{{C}^{2}}={{(10)}^{2}}$
So, $AC=10cm$
$\Rightarrow AR+CR=10$
$\Rightarrow 8-r+6-r=10$
$\Rightarrow 14-2r=10$
$\Rightarrow 2r=14-10$
$\Rightarrow 2r=4$
$\Rightarrow r=2$