Let:
x = Distance from his house to the school
y = distance from school to the library = 360m
z = Distance from this house to the library
The distance from his house to the library is 3 times the distance from his house to the school, so:
a. the distance from Ricardo's house to the school is given by:
b. the distance between his house and the library is: