we have that
In this problem
Triangle SRQ and triangle SLK are similar
that means -----> if two triangles are similar, then the ratio of its corresponding sides is proportional
so
SR/SL=SQ/SK
substitute the given values
40/30=(8x-4)/39
solve the proportion for x
8x-4=(40/30)(39)
8x-4=52
8x=52+4
8x=56
x=7
Find the value of SQ
SQ=8x-4
substitute the value of x
SQ=8(7)-4
SQ=52 units