So with this code using xparse :
\NewDocumentEnvironment{figwcommentary}{O{0.45} m m}
{ \adjustbox{valign=t} {\begin{minipage}{#1\textwidth} #2 \end{minipage} } }
{ \adjustbox{valign=t,right=0.5\textwidth}{ #3 } \bigskip}
That right=0.5\textwidth}
should be right=(1-#1-.05)*\textwidth}
which of course isn't valid code.
It looks like calc or fp can be used for this, but I can't figure out how to reference the passed parameter.