Hello Ryan I am here to help. So the first step is pretty easy: Three cheeseburgers are worth 18, so each one is worth 6. If these are dollars, that's a steal!
From the second equation we get that cheeseburger plus fries-squared is five. Subtracting cheeseburger, which is six, from both sides, we get that fries-squared is negative-one. Math fans will know that there are two solutions to this; either fries are the "imaginary unit" 𝒾 or they are its negative, -𝒾. We'll do the rest of the problem with 𝒾, keeping in mind that at the end we should also take the complex conjugates as solutions.
Finally, we have that cup to the power of fries, minus cup, equals three. Replacing fries with 𝒾, and moving a cup to the other side, we get that cup-to-the-𝒾 is equal to cup-plus-three.
Now, the weird part about this is the cup-to-the-i. The problem with this is that complex exponentiation is technically not a thing. That is to say, there is no one function which is mathematically equal to "input-to-the-power-of-𝒾". In fact, there are infinitely many such functions.
Fortunately, due to reasons that take about six pages to explain (trust me I've done it), there is one particular function that many people have agreed is "the most reasonable one". This is not a mathematical notion, but a human preference. Seeing as this question was presumably written by a human, I am comfortable with using this function.
So, what function is this? Well, given a complex number r∠θ written in polar form (if you don't know what that means don't worry), where -π < θ ≤ π, then (r∠θ)^𝒾 = e^(-θ)∠ln(r).
Applying this to our problem a value r∠θ will be a possible solution for cup if e^(-θ)∠ln(r) = r∠θ + 3. Splitting this into real and imaginary parts, we get two equations: e^(-θ) cos(ln(r)) = r cos(θ) + 3 and e^(-θ) sin(ln(r)) = r sin(θ). We can graph these equations on Desmos:
The possible values of cup are the intersections between the red, green, and purple. There are infinitely many of these which have an angle of around -π/3, and there are two weirdos: One which is a complex number very close to -2.98, and one which is somewhere around -25. The possible values for cup are all of these infinitely many solutions, and also all of their complex conjugates.