Explanation
Let total length be x cm.
Then:
Black=1/8x,White=1/4x,Grey=5.25cm
Add them all:
1/8x+1/4x+5.25=x
Convert 41x to same denominator:
1/8x+2/8x+5.25=x⇒3/8x+5.25=x
Now solve:
x−3/8x=5.25⇒5/8x=5.25
Multiply both sides by 8:
5x=42⇒x=42/5=8.4cm