Using a system of equations, it is found that:
A system of equations is when two or more variables are related, and equations are built to find the values of each variable.
In this problem, we consider the variable x as Pratham's velocity, with variable y as Roshan's velocity.
If they walk in opposite directions, they will meet in 4 hours, which means that each hour they get 16 miles closer, that is, the sum of their velocities is of 16, hence:
x + y = 16.
In the same direction, they will meet in 16 hours, which means that the subtraction of their velocities is of 4, hence:
x - y = 4 -> x = 4 + y.
Replacing on the first equation:
x + y = 16.
4 + y + y = 16.
2y = 12.
y = 6.
x = 4 + y = 10.
More can be learned about a system of equations at https://brainly.com/question/24342899