If we take the general case where a wager W is placed on a value V to be won where the probability of winning is p, then the expected value is made up of the value of winning=V-W (forfeiting the wager but gaining the prize) combined with the probability p of winning=(V-W)p; and the loss of wager combined with the probability 1-p of losing=W(1-p).
The expected value, the sum of the products of value and probability of each outcome (winning and losing), is the difference between these: (V-W)p-W(1-p)=Vp-Wp-W+Wp=Vp-W, because loss is a negative value.
If p=⅛ as given in the question, then the expected value is ⅛V-W. The expected value per wager is (⅛V-W)/W=⅛V/W-1.
It’s not clear what is meant by profit=4W: If the profit is the same as Vp-W (expected value)=4W then V=40W, and the expected value per wager is 4;
if the the profit is the value of winning=V-W, then V-W=4W, so V=5W, making V/W=5, and the expected value per wager is ⅝-1=-⅜=-0.375 or -0.4 to 1 decimal place.