Here's a query to get all the user rankings. It should be straightforward to restrict this to a single user and put it in a procedure:
Select
a.userid,
Sum(decode(a.rank, 'SU', 25, 'EX', 9, 'VG', 5, 'G', 3, 'F',1) * b.tokens)
/ sum(b.tokens) ranking
From
A
inner join
B
on a.GameID = b.GameID
group by
a.userid