how to calculate horizontal distance as a function
You just have to substitute values of slope and vertical distance in formula and get value of horizontal distance. Similarly, any one of them can be found if other two are given. For instance, if you have a slope given in Percentage as 10 % and a vertical distance of 50 feet, then equation will look like: