I'm not sure where you had difficulties, so it's hard to know where you need help. It's always a good idea to show your code as that reveals what you know and what you don't know. (That's probably why so many beginners fail to do it - people with more experience are much more prepared to admit their limitations).
Your example isn't really a complete specification, for example I can't see any logic to why "firstname" is included in the output and "lastname" isn't. I assume you were just cutting corners.
I think you want something like this:
<xsl:template match="Mapping">
<xsl:variable name="mapping" select="."/>
<Mapping>
<xsl:for-each select="Lang[1]/Field">
<xsl:variable name="name" select="@name"/>
<Field name="{$name}">
<xsl:for-each select="$mapping/Lang">
<Value languageid="{@id}">
<xsl:value-of select="Field[@name=$name]/@value"/>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference