\begin{minipage}{.5\textwidth}
\end{minipage}% This must go next to `\end{minipage}`
\begin{minipage}{.5\textwidth}
\end{minipage}


\begin{minipage}[t]{0.5\linewidth} 
\end{minipage}\hfill
\raisebox{-0.5\height}{
\begin{minipage}[t]{0.4\linewidth} 
\end{minipage}}