Premium price of option

How would you calculate the price of the stock given the put strike of 30 and a premium that was 2.31 but has increased to 3.18. The stock was trading at 42 and i know the answer is 26.82

When does the put expire?

Why not this way?

Value of put option = exercise price - stock price

3.18 = 30 - x?

hmm my calc it ignores time value