Here is an example of passing variables in lua:
gStateMachine:change('begin-game', {
            level = self.level,
            score = self.score,
            matchispossible = false
        })
then on the receiving end in the BeginGameState.lua
function BeginGameState:enter(def)
    -- grab level # from the def we're passed
    self.level = def.level
    self.score = def.score