These are very basic questions, and I wonder whether you are really going the right way about learning the language. Have you been reading any XSLT books and studying the examples?
A good way to tackle this would be to have two template rules, one for person elements with a single sourcedid, another for those with two.
<xsl:template match="person[count(sourcedid)=1]">
<sourcedid_source>
<xsl:value-of select="sourcedid/source" />
</sourcedid_source>
</xsl:template>
<xsl:template match="person[count(sourcedid)=2]">
<sourcedid_source>
<xsl:variable name="new">"New"</xsl:variable>
<xsl:value-of select="sourcedid[sourcedidtype=$new]/source" />
</sourcedid_source>
</xsl:template>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference