You must factor in the call bet first the total will be the pot amount. In your example above you will have to call the big blind, so Big Blind (20) Small Blind (10) then your call (20) for total pot 50 so the max you could make pot is 100. To make it 100 you will need to call 20 and bet 50 for a total of 70. So in your example 70 is pot bet.
I give you a post flop an example:
There is $20 in pot already
Player 1 bets $5. Pot now $25
Player 2 wants to bet pot. He must first call the $5 bringing the pot to $30
Then he bet the pot $30 so the total pot will now be $60.
So Player 2 raise amount will be $5+$30=$35
Here is a more complicated example with multiple players involved from Pokerstars:
https://www.pokerstars.com/help/articles/rules-pot-limit-bet/92256/
The formula you are referring to is
"3 * size of opponent's bet/raise + size of pot before your opponent's bet/raise was made."
For an unopened pot preflop take out the big blind from pot size as the big blind it is the bet/raise and according to the formula it is the size of pot before bet/raise was made.
Using formula
Your example 3*20+10=70
My example 3*$5+$20=$35