Arianna and her friend Grace are going to a carnival that has games and rides. Arianna played 6 games and went on 3 rides and spent a total of $27. Grace played 2 games and went on 9 rides and spent a total of $41. Determine the cost of each game and the cost of each ride.