Your first equation is correct, but the second is not. Let's look at the statement:

The energy drink has 6 more than twice the number of mg of caffeine as compared to the cola.

The energy drink:

has:

6 more:

than twice the number of mg of caffeine as compared to the cola:

Putting this together into an equation, we have:

Now, substitute this into the first equation for to get:

Solve this for , then use the equation to find .