"2 times", "twice" and "2X", when to use which and why?

Solution 1:

Firstly, they all mean exactly the same.

2X is used informally and sometimes in technical writing as a convenient abbreviation to avoid verbosity.

2 times highlights the number 2 and may be used to standardise writing instead of using the special twice if there are other numbers involved (5 times, 8 times).

Twice is most succinct in ordinary non-technical writing.