Explanation:
V = $12
M = The number of months
So, function = v + $2m
Lets take an Example = for example the stock price now is $20
V + $2m = $20
V = $12
So, 12 + $2m = 20
$2m = 20 - 12
$2m = 8
m = 8/2
m = 4
So this used we can easily find the number of months
Now let's try with the stock price only
The total now is $24
And 6 months passed
v + $2m = $24
v + $2(6) = $24
v + $12 = $24
v = $24 - $12
v = $12
So we got the same stock price
We found with this function the stock price as well as the number of months
Hope this answers ur question!