Answer:
Riley has 72 tokens
Explanation:
System of Equations
We have two conditions for the tokens Riley and Erik have earned. Let's call x and y to the number of tokens of Riley and Erik respectively. The first condition states that
![x+y=135](https://img.qammunity.org/2021/formulas/mathematics/middle-school/65o0w16s6h82xuwe79wgefyysj1pnzi7ov.png)
Solving for y
![y=135-x](https://img.qammunity.org/2021/formulas/mathematics/middle-school/5884bmepp2ivqbq17wcazdgelaowd6tf3x.png)
The second condition is that the ratio of the number of tokens that Riley had to the number of tokens that Erik has is 8 to 7. It's written as
![\displaystyle (x)/(y)=(8)/(7)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/2vemid8nq5c57zyf4bgbl25uycjk0o6v52.png)
Or equivalently
![7x=8y](https://img.qammunity.org/2021/formulas/mathematics/middle-school/gkplyusdpb0zuvak4dcbdif5gggycsjkeb.png)
Replacing y from the first equation
![7x=8(135-x)](https://img.qammunity.org/2021/formulas/mathematics/middle-school/okxd1y8yodqf8ao7b5109q4es1yr8kbrgb.png)
Operating
![7x=1080-8x](https://img.qammunity.org/2021/formulas/mathematics/middle-school/uws2uo1tplr1ygh8euoevlj4f9lc7zfvav.png)
Simplifying
![15x=1080](https://img.qammunity.org/2021/formulas/mathematics/middle-school/rf3oql79iep10dpv62ssuukztg31h9ghnm.png)
![\boxed{x=72}](https://img.qammunity.org/2021/formulas/mathematics/middle-school/us8bshocrqebss80cbsgf2on12rbfxavpd.png)
Riley has 72 tokens