Answer: divide by zero, or square root of a negative
Explanation: If your question is how to get infinity as an answer to a problem, that generally means that the answer is undefined or doesn't exist.
A couple of ways to get that...
You try to divide by zero. In other words, a problem that asks you to perform something like this: 5/0= or 23/(4-4)= Such a problem will give you an error on a calculator because the answer is infinity or doesn't exist.
Another way is to try to get the square root of a negative number. That answer doesn't exist as a real number, so will also give you an error on a calculator.