The deterministic way to find $x,y$ for $Ax+By=1$ where $A,B$ are known and$(A,B)=1$ is to utilize the property of the successive convergents of a continued fraction.
$\frac{17}5=3+\frac25=3+\frac1{\frac52}=3+\frac1{2+\frac12}$
So, the previous convergent of $\frac{17}5$ is $3+\frac12=\frac72$ $\implies 17\cdot2-5\cdot7=-1$
We have $5x+6=10+17y$ for some integers $x,y$
or ,$5x-17y=4=4(5\cdot7-17\cdot2)$
or, $5(x-28)=17(y-8)$
or, $\frac{5(x-28)}{17}=y-8$ which is an integer.
$\implies 17\mid5(x-28)\implies17\mid(x-28)$ as $(5,17)=1$
$\implies x=17z+28$ where $z$ is any integer.
or, $x=17(z+1)+11=17w+1$ where $w=z+1$ is also some integer.
Alternatively, $\frac{17}5=3+\frac25=3+\frac1{\frac52}=3+\frac1{2+\frac12}=3+\frac1{2+\frac1{1+\frac11}}$
So, the next convergent of $\frac{17}5$ is $3+\frac1{2+1}=\frac{10}3$ $\implies 17\cdot 3-5\cdot10=1$
$5x-17y=4=4(17\cdot3-5\cdot10)$
or, $5(x+40)=17(y+12)$
or, $\frac{5(x+40)}{17}=y+12$ which is an integer.
So, $17\mid5(x+40)\implies 17\mid(x+40)$ as $(5,17)=1$
$\implies x+40=17u$ where $u$ is any integer.
or, $x=17u-40=17(u-2)-6=17v-6$ or $x=17(u-3)+11=17t+11$ where $v=u-2,t=u-3$ are integers.