There are 850 Douglas fir and ponderosa pine trees The company paid an average of $300 for each ponderosa pine. If the company paid $217, 500 for the trees, how many of each kind did the company buy?

You don't have enough information to arrive at a unique solution.

Here is why....

let the number of pine trees be x
then the number of Douglas fir is 850-x

let the cost of a Douglas fir be $y

then 300x + (850-x)(y) = 217500
.
.
y = (217500-300x)/(850-x)

Now x will have to be whole number so that 0<x<725, or else y will be negative.

there are 8 whole number solutions, (I made up a program to find integer solutions), the first one being:
100 pines, 750 firs at a cost of $250 per fir
the last one being:
725 pines and 125 firs with the fir trees having no charge

check your data.