On the sidewalk the distance from the dormitory to the cafeteria is 400 meters. By cutting across the lawn, the walking distance is shortened to 300 meters. how long is each part of the L shaped sidewalk?

I visualize a right angled triangle with sides

y, 400-y, and hypotenuse 300

There will be large numbers , so here is a little trick
let x be multiples of 100
so we have
x, 4-x, and 3 as the sides of a right-angled triangle

x^2 + (4-x)^2 = 3^2
x^2 + 16 - 8x + x^2 = 9
2x^2 - 8x + 7 = 0
x = (8 ± √8)/4
= 2.7071 or 1.2929
but x was a multiple of 100

so one leg was 270.71 , the other 400-270.71 or 129.29 m

or

one leg was 129.29 , then the other leg was 270.71

check
270.71^2 + 129.29^2 = 89999.8 or appr 90000 = 300^2

To find the lengths of each part of the L-shaped sidewalk, we can use the Pythagorean theorem.

Let's assume the length of the first part of the sidewalk (from the dormitory to the corner) is "x" meters, and the length of the second part of the sidewalk (from the corner to the cafeteria) is "y" meters.

According to the problem, when walking along the sidewalk, the total distance is 400 meters. So, we can write the equation:

x + y = 400 (Equation 1)

According to the problem, cutting across the lawn shortens the walking distance to 300 meters. By doing this, we are essentially forming a right triangle where the first part of the sidewalk is one side, the second part of the sidewalk is the other side, and the diagonal across the lawn acts as the hypotenuse.

Using the Pythagorean theorem, we can write the equation:

x^2 + y^2 = 300^2 (Equation 2)

Now we have a system of two equations (Equation 1 and Equation 2) that we can solve simultaneously to find the values of "x" and "y".

One way to solve this system of equations is by substitution. From Equation 1, we can solve it for one variable (let's solve for "x"):

x = 400 - y

Now substitute this value of "x" into Equation 2:

(400 - y)^2 + y^2 = 300^2

Simplifying this equation will give a quadratic equation in terms of "y". Solving this quadratic equation will give the value(s) of "y". Once "y" is known, substitute it back into Equation 1 to find the corresponding value(s) of "x".

By solving this system of equations, you will find the lengths of each part of the L-shaped sidewalk.