Solution:
Let length of red string = a
Let length of the yellow string = b
Given that,
length of the yellow string is 5
b = 5
The length of a red string is 7 less than 8 times the length of a yellow string
Therefore,
a = 8b - 7
Substitute b = 5
a = 8(5) - 7
a = 40 - 7
a = 33
Thus length of red string is 33