First thing would be to evaluate the expression into something you can parse:
Converting Postfix Expressions to Infix[
^] (In C#, but concept is the same)
Then you need to find out what the tokens are (variables) and assign values to them (in your example, i is a variable token).
After that, its a simple matter of evaluating the infix expression. Infix evaluation is pretty easy, just pop off 2 numbers and an operator, do the operation, push the value back on the stack and repeat until you only have a value on the stack, the value is the answer.