If the adjacent side of the ruler is at right angle.
Draw a straight line and mark a length say 'x'
y | \ h
y = 26
x = some value
apply hypotenuse theorem h = root of(y2 + x2)
substitue h = 29, and get value of x.
hope this would be correct.