Your right triangle has lengths of x, 2x-1 and hypotenuse of 17.
Using Pythagorean Theorem,
x2 + (2x-1)2 = 172
x2 + (2x-1)(2x-1)=289
x2+4x2-4x+1=289
5x2-4x+1-289=0
5x2-4x-288=0
Using AC method Multiply 5 times -288=-1440
-40 x 36 = -1440
5x2-40x+36x-288=0
Factor by grouping
5x(x-8)+36(x-8)=0
(5x+36)(x-8)=0
Set each equal to zero
5x+36=0
x=36/5=-7.2 extraneous cannot have a negative side
x-8=0
x=8
2x-1=2(8)-1=15
So the legs are 8 and 15
To check:
82+152=172
64+225=289
289=289 checks