What's the present value of using the payment plan?
In all common sense the present value of a loan is the value that you can pay in the present to avoid taking a loan, which in this case is the lump sum payment of $2495. That rather supposes the question is a trick, providing irrelevant information about the stock market.
However, if some strange interpretation is required which ignores the lump sum and wants to know how much you need in the present to pay the loan while being able to make 8% on the stock market that can be done.
I will initially assume that since the lender's APR works out about 9.6% per month that the 8% from the stock market is also per month, but will also calculate for 8% annual effective and an 8% annual nominal rate.
The calculation
If you have $x in hand (present value) and it is exactly enough to take the loan while investing in the stock market, the value in successive months is $x plus the market return less the loan payment. In the third month the loan is paid down so the balance is zero. I.e.
v1 = 1.08 x - 997
v2 = 1.08 v1 - 997
v3 = 1.08 v2 - 997 = 0
∴ v3 = 1.08 (1.08 (1.08 x - 997) - 997) - 997 = 0
∴ x = 2569.37
So the present value of using the payment plan while investing is $2569.37.
You would need $2569.37 to cover the loan while investing, which is more than the $2495 lump sum payment requires. Therefore, it would be advisable to make the lump sum payment because it is less expensive: If you have $2569.37 in hand it would be best to pay the lump sum and invest the remaining $74.37 in the stock market. Otherwise you invest $2569.37 (initially), pay the loan and end up with $0 in three months.
One might ask, what rate of return would the stock market need to yield to make it worth taking the loan?
The APR proposed by the loan can be calculated.
The present value of a loan is equal to the sum of the payments discounted to present value. I.e. with
s = present value of loan
n = number of periods
d = periodic payment
r = periodic interest rate

∴ by induction

So by comparing the $2495 lump sum payment with $997 over 3 x monthly instalments the interest rate implied by the loan can be found.
s = (d - d (1 + r)^-n) / r
∴ 2495 = (997 - 997 (1 + r)^-3) / r
Solving for r
r = 0.0964431 = 9.64431 % per period (month)
∴ APR = 9.64431 * 12 = 115.732 % nominal compounded monthly
or (1 + 0.0964431)^12 - 1 = 201.879 % effective annual interest
If you could obtain 9.64431% per month on the stock market the $x cash in hand required would be calculated by
v1 = 1.0964431 x - 997
v2 = 1.0964431 v1 - 997
v3 = 1.0964431 v2 - 997
∴ v3 = 1.0964431 (1.0964431 (1.0964431 x - 997) - 997) - 997 = 0
∴ x = 2495
This is equal to the lump sum payment, so the calculated interest is comparable to the stock market rate of return. If you could gain more than 9.64431% per month on the stock market it would be better to invest and take the loan.
Recurrence Form
Solving the recurrence form shows the calculation is equivalent to the loan formula, e.g.
v1 = 1.08 pv - 997
v2 = 1.08 v1 - 997
v3 = 1.08 v2 - 997
becomes v[m + 1] = (1 + y) v[m] - p
where v[0] = pv
where
m is the month number
v[m] is the value in month m
y is the stock market yield
p is the payment amount
pv is the present value
∴ v[m] = (p + (1 + y)^m (pv y - p)) / y
In the final month v[final] = 0
, i.e. when m = 3
(p + (1 + y)^m (pv y - p)) / y = 0
∴ pv = (p - p (1 + y)^-m) / y
Compare with the earlier loan formula: s = (d - d (1 + r)^-n) / r
They are exactly equivalent, which is quite interesting, (because it wasn't immediately obvious to me that what the lender charges is the mirror opposite of what you gain by investing).
The present value can be now be calculated using the formula.
Still assuming the 8% stock market return is per month.
m = 3
p = 997
y = 0.08
pv = (p - p (1 + y)^-m) / y
∴ pv = (997 - 997 (1 + 0.08)^-3) / 0.08 = 2569.37
If the stock market yield is 8% per annum effective rate
monthly yield, y = (1 + 0.08)^(1/12) - 1 = 0.00643403
∴ pv = (997 - 997 (1 + 0.00643403)^-3) / 0.00643403 = 2952.92
and if it is given as a nominal annual yield, 8% compounded monthly
monthly yield, y = 0.08 / 12 = 0.00666667
∴ pv = (997 - 997 (1 + 0.00666667)^-3) / 0.00666667 = 2951.56