Deriving the Formula for Average Speed (Same distance). Let me start of by specifying the question:


A and B are two towns. Kim covers the distance from A to B on a scooter at 17Km/hr and returns to A on a bicycle at 8km/hr.What is his average speed during the whole journey.


I solved this problem by using the formula (since the distances are same):
$$ \text{Average Speed (Same distance)} = \frac{2xy}{x+y} = \frac{2\times17\times8}{17+8} =10.88 \text{Km/hr}$$
Now I actually have two questions:
Q1- I know that $$ Velocity_{Average}=  \frac{\Delta S }{\Delta T} $$
Now here does $$\Delta S$$ represent $$ \frac{S_2+S_1 }{2} \,\text{or}\, S_2-S_1 ?$$
Where S2 is the distance covered from point A to point B and S1 is the distance covered from point B to point A
Q2. How did they derive the equation:
$$ Velocity_{Average(SameDistance)} = \frac{2xy}{x+y} $$
Could anyone derive it by using 
$$ Velocity_{Average}=  \frac{\Delta S }{\Delta T} $$
 A: If one traveled distance $d_k$ at speed $v_k$, this took time $t_k=\dfrac{d_k}{v_k}$. It took time $T=\sum\limits_kt_k$ to travel distance $D=\sum\limits_kd_k$ and the average speed $V$ solves $D=VT$, hence $$V=\frac{\sum\limits_kd_k}{\sum\limits_k\frac{d_k}{v_k}}.
$$
In the particular case when there are $n$ distances which are all equal, one gets $V=\dfrac{n}{\sum\limits_{k=1}^n\frac1{v_k}}$, or 
$$\frac1V=\frac1n\sum\limits_{k=1}^n\frac1{v_k}.
$$
A: average speed= total distance/total time taken
lat take 1 km up and down journey. spped while going x kmper hour, while coming y km per hour: then tot dist= up+down=1+1=2 km
           total time taken= (1/x) + (1/y)   
          so avg speed=total distance/total time taken=2/((1/x) + (1/y) )=2xy/(x+y)
A: This answer applies only to Question 2. 
To answer Q2 one must first acknowledge the difference between velocity and speed. The equation given is only correct if the two legs of the trip exactly the same length in exactly the same direction. This is due to velocity being a measure of distance displaced over time rather than distance traveled over time. In the event that an object travels from point A to point B and back again, the distance that object been displaced is precisely 0 (no matter what units are used to measure). Therefore, the magnitude of the object's average velocity is also 0.
What the formula actually models is the average speed of a two legged trip where both legs are identical in distance. In event that the entire trip is in one direction, the average speed and average velocity are the same.
$speed = \frac{distance}{time}$
The distance of each leg of the trip is $l$
$distance_{total} = 2l$ 
$time_{total} = t_1 + t_2$ where $t_1$ is the length of time the first leg of the trip took and $t_2$ the second.
Rearranging the first equation it can be shown that $time = \frac {distance} {speed}$
Therefore $time_{total} = \frac {distance_1} {speed_1} + \frac {distance_2} {speed_2} = \frac {l} {speed_1} + \frac {l} {speed_2} = \frac {l (speed_1 + speed_2)} {speed_1 speed_2}$
Let $x = speed_1$ and $y = speed_2$
$speed_{average} = \frac {distance_{total}} {time_{total}} = \frac {2l} {\frac {l (x + y)} {x y}} = \frac {2xy} {x + y}$
A: Question 1 is impossible to answer since you haven't told us what you mean by the symbols $S_1$ and $S_2$. 
For question 2, make believe the distance from $A$ to $B$ is $xy$ kilometers (where I take it $x$ and $y$ are the two velocities, although you didn't tell us that, either). Then the total distance travelled is $2xy$. The journey at speed $x$ takes $y$ hours, and the journey at speed $y$ takes $x$ hours, so the total time taken is $x+y$. Thus, the average speed is distance/time which is $${2xy\over x+y}$$
A: Let the distance from the point A to point B be 100 miles. And if the car traveled at a speed of 40 M/hr. and reached back to the point A traveled from point B at speed of 60 M/hr. the average speed is 48 M/hr. 2ab/a+b. Here a and b are the speed. Therefore, 2x40x60/ 40+60. 
I would like to explain it some other way. In the above example I told you let the distance
be 100 Mile, from A to B. So,if 40 M/hr, it'll take 150 minutes to cover 100 Miles. Like, the same distance, from B to A it'll take 100 minutes if the seed is 60 M/hr. It 'll take 250 minutes to travel a total distance of 200 Miles. So, we can figure it out by an equation to get the average like this. 200x60/250 = 48.   
A: *

*Here $\Delta s$ means the total distance travelled and it is $ab+ba=2ab$. Since the distance between the town will remain same. If distance between A and B is $w$ the $\Delta s=2w$. 

*Yes, this equation can be derived by, $v_{avg}=\dfrac{\Delta s}{\Delta t}$. Let speeds are $x$ while going and y while returning. Time taken while going is $\dfrac{d}{s}=\dfrac{w}{x}$, and time taken while returning is $\dfrac{w}{y}$. 


So, using $v_{avg}=\dfrac{\Delta s}{\Delta t}$, 
$v_{avg}=\dfrac{2w}{\dfrac{w}{x}+\dfrac{w}{y}}=\dfrac{2xy}{x+y}$
