Find the length of each colored line

Answer:
First one is 2, second is 5
Step-by-step explanation: