<?xml version="1.0" encoding="us-ascii"?><InstanceReport xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Version>2.4.0.8</Version><ReportLongName>008 - Disclosure - 4. Related Party Transactions</ReportLongName><DisplayLabelColumn>true</DisplayLabelColumn><ShowElementNames>false</ShowElementNames><RoundingOption /><HasEmbeddedReports>false</HasEmbeddedReports><Columns><Column FlagID="0"><Id>1</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><CurrencyCode /><FootnoteIndexer /><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName /><CurrencySymbol /><contextRef><ContextID>c2_From1Apr2013To30Jun2013</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001454742</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2013-04-01T00:00:00</PeriodStartDate><PeriodEndDate>2013-06-30T00:00:00</PeriodEndDate><Segments /><Scenarios /></contextRef><UPS /><CurrencyCode /><OriginalCurrencyCode /></MCU><CurrencySymbol /><Labels><Label Key="CalendarSupplement" Id="0" Label="3 Months Ended" /><Label Key="Calendar" Id="1" Label="Jun. 30, 2013" /></Labels></Column></Columns><Rows><Row FlagID="0"><Id>1</Id><IsAbstractGroupTitle>true</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>1</Level><ElementName>us-gaap_RelatedPartyTransactionsAbstract</ElementName><ElementPrefix>us-gaap_</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>xbrli:stringItemType</ElementDataType><SimpleDataType>string</SimpleDataType><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>Related Party Transactions [Abstract]</Label></Row><Row FlagID="0"><Id>2</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>2</Level><ElementName>us-gaap_RelatedPartyTransactionsDisclosureTextBlock</ElementName><ElementPrefix>us-gaap_</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole>terseLabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="c2_From1Apr2013To30Jun2013" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText>&lt;div style="LINE-HEIGHT: 10.25pt; TEXT-INDENT: 0pt; DISPLAY: block; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="justify"&gt;

      &lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman, serif; FONT-SIZE: 9pt; FONT-WEIGHT: bold"&gt;4.&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;

      &amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;Related Party

      Transactions&lt;/font&gt;

    &lt;/div&gt;&lt;br/&gt;&lt;table cellpadding="0" cellspacing="0" id="list-1" width="100%" style="FONT-FAMILY: times new roman; FONT-SIZE: 11pt; FONT-SIZE: 11pt; FONT-FAMILY: times new roman"&gt;

        &lt;tr valign="top"&gt;

          &lt;td align="right" style="WIDTH: 56px"&gt;

            &lt;div&gt;

              &lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman, serif; FONT-SIZE: 9pt"&gt;a)&amp;#160;&amp;#160;&amp;#160;&amp;#160;

              &amp;#160;&lt;/font&gt;

            &lt;/div&gt;

          &lt;/td&gt;

          &lt;td width="1509"&gt;

            &lt;div style="TEXT-INDENT: 0pt; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="justify"&gt;

              &lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman, serif; FONT-SIZE: 9pt"&gt;As

              at June 30, 2013, the Company owes $300,000 (December

              31, 2012 - $300,000) to a company controlled by

              officers and directors of the Company.&amp;#160;&amp;#160;The

              amount owing is unsecured, bears interest at 10% per

              annum, and due on demand.&amp;#160;&amp;#160;As at June 30,

              2013, the Company has recorded accrued interest of

              $57,096 (December 31, 2012 - $42,219) which has been

              included in accounts payable and accrued liabilities

              &amp;#8211; related parties.&lt;/font&gt;

            &lt;/div&gt;

          &lt;/td&gt;

        &lt;/tr&gt;

      &lt;/table&gt;&lt;br/&gt;&lt;table cellpadding="0" cellspacing="0" id="list-2" width="100%" style="FONT-FAMILY: times new roman; FONT-SIZE: 11pt; FONT-SIZE: 11pt; FONT-FAMILY: times new roman"&gt;

        &lt;tr valign="top"&gt;

          &lt;td align="right" style="WIDTH: 56px"&gt;

            &lt;div&gt;

              &lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman, serif; FONT-SIZE: 9pt"&gt;b)&amp;#160;&amp;#160;&amp;#160;

              &amp;#160;&amp;#160;&lt;/font&gt;

            &lt;/div&gt;

          &lt;/td&gt;

          &lt;td width="1509"&gt;

            &lt;div style="TEXT-INDENT: 0pt; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="justify"&gt;

              &lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman, serif; FONT-SIZE: 9pt"&gt;As

              at June 30, 2013, the Company owes $18,725 (December

              31, 2012 - $nil) to companies under common control by

              officers and directors of the Company which has been

              included in accounts payable and accrued liabilities

              &amp;#8211; related parties. The amounts owing are

              unsecured, non-interest bearing, and due on

              demand.&lt;/font&gt;

            &lt;/div&gt;

          &lt;/td&gt;

        &lt;/tr&gt;

      &lt;/table&gt;&lt;br/&gt;&lt;table cellpadding="0" cellspacing="0" id="list-3" width="100%" style="FONT-FAMILY: times new roman; FONT-SIZE: 11pt; FONT-SIZE: 11pt; FONT-FAMILY: times new roman"&gt;

        &lt;tr valign="top"&gt;

          &lt;td align="right" style="WIDTH: 56px"&gt;

            &lt;div&gt;

              &lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman, serif; FONT-SIZE: 9pt"&gt;c)&amp;#160;&amp;#160;&amp;#160;

              &amp;#160;&amp;#160;&lt;/font&gt;

            &lt;/div&gt;

          &lt;/td&gt;

          &lt;td width="1509"&gt;

            &lt;div style="TEXT-INDENT: 0pt; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="justify"&gt;

              &lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman, serif; FONT-SIZE: 9pt"&gt;For

              the period ended June 30, 2013, the Company incurred

              $22,500 (December 31, 2012 - $43,500) to the

              President and CEO of the Company for consulting

              services. As at June 30, 2013, the Company owes

              $37,500 (December 31, 2012 - $15,000), which has been

              included in accounts payable and accrued liabilities

              &amp;#8211; related parties. The amounts owing are

              unsecured, non-interest bearing, and due on

              demand.&lt;/font&gt;

            &lt;/div&gt;

          &lt;/td&gt;

        &lt;/tr&gt;

      &lt;/table&gt;&lt;br/&gt;&lt;table cellpadding="0" cellspacing="0" id="list-4" width="100%" style="FONT-FAMILY: times new roman; FONT-SIZE: 11pt; FONT-SIZE: 11pt; FONT-FAMILY: times new roman"&gt;

        &lt;tr valign="top"&gt;

          &lt;td align="right" style="WIDTH: 56px"&gt;

            &lt;div&gt;

              &lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman, serif; FONT-SIZE: 9pt"&gt;d)&amp;#160;&amp;#160;&amp;#160;

              &amp;#160;&amp;#160;&lt;/font&gt;

            &lt;/div&gt;

          &lt;/td&gt;

          &lt;td width="1509"&gt;

            &lt;div style="TEXT-INDENT: 0pt; MARGIN-LEFT: 0pt; MARGIN-RIGHT: 0pt" align="justify"&gt;

              &lt;font style="DISPLAY: inline; FONT-FAMILY: Times New Roman, serif; FONT-SIZE: 9pt"&gt;For

              the period ended June 30, 2013, the Company incurred

              $800 (December 31, 2012 - $nil) to the President and

              CEO of the Company for reimbursement of expenses

              which has been included in accounts payable and

              accrued liabilities &amp;#8211; related parties.&lt;/font&gt;

            &lt;/div&gt;

          &lt;/td&gt;

        &lt;/tr&gt;

      &lt;/table&gt;&lt;br/&gt;</NonNumbericText><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>nonnum:textBlockItemType</ElementDataType><SimpleDataType>na</SimpleDataType><ElementDefenition>The entire disclosure for related party transactions. Examples of related party transactions include transactions between (a) a parent company and its subsidiary; (b) subsidiaries of a common parent; (c) and entity and its principal owners; and (d) affiliates.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 850

 -SubTopic 10

 -Section 50

 -Paragraph 3

 -URI http://asc.fasb.org/extlink&amp;oid=6457730&amp;loc=d3e39603-107864



Reference 2: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 850

 -SubTopic 10

 -Section 50

 -Paragraph 4

 -URI http://asc.fasb.org/extlink&amp;oid=6457730&amp;loc=d3e39622-107864



Reference 3: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 850

 -SubTopic 10

 -Section 50

 -Paragraph 1

 -URI http://asc.fasb.org/extlink&amp;oid=6457730&amp;loc=d3e39549-107864



Reference 4: http://www.xbrl.org/2003/role/presentationRef

 -Publisher SEC

 -Name Regulation S-X (SX)

 -Number 210

 -Section 04

 -Paragraph b

 -Article 3A



Reference 5: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 235

 -SubTopic 10

 -Section S99

 -Paragraph 1

 -Subparagraph (SX 210.4-08.(k))

 -URI http://asc.fasb.org/extlink&amp;oid=6881521&amp;loc=d3e23780-122690



Reference 6: http://www.xbrl.org/2003/role/presentationRef

 -Publisher SEC

 -Name Regulation S-X (SX)

 -Number 210

 -Section 08

 -Paragraph k

 -Article 4



Reference 7: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 850

 -SubTopic 10

 -Section 50

 -Paragraph 6

 -URI http://asc.fasb.org/extlink&amp;oid=6457730&amp;loc=d3e39691-107864



Reference 8: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 850

 -SubTopic 10

 -Section 50

 -Paragraph 5

 -URI http://asc.fasb.org/extlink&amp;oid=6457730&amp;loc=d3e39678-107864



Reference 9: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Statement of Financial Accounting Standard (FAS)

 -Number 57

 -Paragraph 1-4

 -LegacyDoc This reference is SUPERSEDED by the Accounting Standards Codification effective for interim and annual periods ending after September 15, 2009.  This reference is included to help users transition from the previous accounting hierarchy and will be removed from future versions of this taxonomy.



</ElementReferences><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>Related Party Transactions Disclosure [Text Block]</Label></Row></Rows><Footnotes /><IsEquityReport>false</IsEquityReport><ReportName>4. Related Party Transactions</ReportName><MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel><SharesRoundingLevel>UnKnown</SharesRoundingLevel><PerShareRoundingLevel>UnKnown</PerShareRoundingLevel><ExchangeRateRoundingLevel>UnKnown</ExchangeRateRoundingLevel><HasCustomUnits>true</HasCustomUnits><IsEmbedReport>false</IsEmbedReport><IsMultiCurrency>false</IsMultiCurrency><ReportType>Sheet</ReportType><RoleURI>http://hdsicorp.com/role/4RelatedPartyTransactions</RoleURI><NumberOfCols>1</NumberOfCols><NumberOfRows>2</NumberOfRows></InstanceReport>
