The expression "text" is a formula. The same formula that would be valid on as the "Points for Playing" formula on the Game tab, except that the variables specific to a player won't be available (since it isn't specific to a player). I do have a to-do item to make the formula create/test dialog available directly from the Layout Token dialog so that you can write and test your formula for this token directly from there, but for now the best thing to do is go to the Game tab, press the "Test Formula" button and try out your formula there first, then paste it into the "text" field of the "expression" token.
So "buyin" is not a valid formula variable. What you are looking for is the buy-in cost for players, which can be different for each player. The variable for a player is "buyinCost", which would reflect that player's cost to buy-in to the tournament. The one that applies to all players would be "defaultBuyinFee". Note that this will take the buy-in fee of the master buy-in profile.
Likewise for buyinRake. Although valid, it is for a specific player. For all players, it should be "defaultBuyinRake".
<expression text="defaultBuyinFee - defaultBuyinRake" format="number">