Question 622109
To solve this problem, you need to write two equations using what you know.

First, you know that Arif walks for x hours at 5km/h and runs for y hours at 10km/h for a total of 35 km.  Like you stated, distance equals time multiplied by speed, so we need to create one equation adding the distances from running and walking that will total 35km. This can be written as:
5x + 10y = 35 
(where 5x is the total distance walking and 10y is the total distance running)

Next, you know that the average speed is 7km/h.  Using the equation speed = distance/time, we have:
7 = 35/(x+y)
Now rewrite this second equation in terms of x:
7 = 35/(x+y)
7(x+y) = 35
7x + 7y = 35
7y = 35 - 7x
y = 35/7 - 7x/7 (I am just simplifying by dividing both sides by 7)
y = 5 - x 

Now plug this second equation into the first equation for y, and solve for x:
5x + 10y = 35
5x + 10(5-x) = 35
5x + 50 - 10x = 35
50 - 5x = 35
-5x = -15
x = 3
So Arif walked for 3 hours.  To find y, plug this x value into the second equation:
y = 5 - x
y = 5 - 3
y = 2
So x = 3 and y = 2.