Hi,
welcome to the forum!
When I tested your code, there is no extra space between words and [3 min] is not put in two lines.
Perhaps you can post a
minimal working example that shows the issue? Note, when you post an incomplete snippet, everybody who wants to test it has to build a document around. Not only is this multiple work, but it happens that this works different than your actual code. Happens here, it seems.
Code: Select all
\documentclass{article}
\usepackage{tcolorbox}
\newcommand{\testt}[1]{\textbf{Aufgabe #1: {\thesection}}}
\def\mytcolorbox#1#2#3%
{%
\begin{tcolorbox}%
#1\hfill[#2 Min]%
\tcblower%
#3%
\end{tcolorbox}%
}%
\begin{document}
\mytcolorbox{\testt{hello} text1 text2 text 3 and so on...}{3}{gut}
\end{document}

- aufgabe.png (10.65 KiB) Viewed 2104 times
Stefan