The process of borrowing shares and selling them is called shorting a stock, or "going short." When you use money to buy shares, it is called "going long."
In general, your strategy of going long and short in the same stock in the same amounts does not gain you anything. Let's look at your two scenarios to see why.
When you start, LOOT is trading at $20 per share. You purchased 100 shares for $2000, and you borrowed and sold 100 shares for $2000. You are both long and short in the stock for $2000. At this point, you have invested $2000, and you got your $2000 back from the short proceeds. You own and owe 100 shares.
Under scenario A, the price goes up to $30 per share. Your long shares have gone up in value by $1000. However, you have lost $1000 on your short shares. Your short is called, and you return your 100 shares, and have to pay interest. Under this scenario, after it is all done, you have lost whatever the interest charges are.
Under scenario B, the prices goes down to $10 per share. Your long shares have lost $1000 in value. However, your short has gained $1000 in value, because you can buy the 100 shares for only $1000 and return them, and you are left with the $1000 out of the $2000 you got when you first sold the shorted shares. However, because your long shares have lost $1000, you still haven't gained anything. Here again, you have lost whatever the interest charges are.
As explained in the Traders Exclusive article that @RonJohn posted in the comments, there are investors that go long and short on the same stock at the same time. However, this might be done if the investor believes that the stock will go down in a short-term time frame, but up in the long-term time frame. The investor might buy and hold for the long term, but go short for a brief time while holding the long position.
However, that is not what you are suggesting. Your proposal makes no prediction on what the stock might do in different periods of time. You are only attempting to hedge your bets. And it doesn't work. A long position and a short position are opposites to each other, and no matter which way the stock moves, you'll lose the same amount with one position that you have gained in the other position. And you'll be out the interest charges from the borrowed shares every time.
With your comment, you have stated that your scenario is that you believe that the stock will go up long term, but you also believe that the stock is at a short-term peak and will drop in the near future. This, however, doesn't really change things much. Let's look again at your possible scenarios.
You believe that the stock is a long-term buy, but for some reason you are guessing that the stock will drop in the short-term. Under scenario A, you were incorrect about your short-term guess. And, although you might have been correct about the long-term prospects, you have missed this gain. You are out the interest charges, and if you still think the stock is headed up over the long term, you'll need to buy back in at a higher price.
Under scenario B, it turns out that you were correct about the short-term drop. You pocket some cash, but there is no guarantee that the stock will rise anytime soon. Your investment has lost value, and the gain that you made with your short is still tied up in stocks that are currently down.
Your strategy does prevent the possibility of the unlimited loss inherent in the short. However, it also prevents the possibility of the unlimited gain inherent in the long position. And this is a shame, since you fundamentally believe that the stock is undervalued and is headed up. You are sabotaging your long-term gains for a chance at a small short-term gain.