<?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>018 - Disclosure - Stockholders' Equity and Related Financing Agreements</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>Context_FYE__30-Jun-2013</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001362718</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2012-07-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="12 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_EquityAbstract</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>Stockholders' Equity and Related Financing Agreements [Abstract]</Label></Row><Row FlagID="0"><Id>2</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>2</Level><ElementName>us-gaap_StockholdersEquityNoteDisclosureTextBlock</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>verboseLabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="Context_FYE__30-Jun-2013" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText>&lt;div align="justify" style="margin-left: 0pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&lt;font style="font-size: 10pt; font-family: times new roman; font-variant: small-caps; font-weight: bold; display: inline;"&gt;Note&amp;#160;&amp;#160;11 &amp;#8211; Stockholders&amp;#8217; Equity and Related Financing Agreements&lt;/font&gt;&lt;/div&gt;
&lt;div style="display: block; text-indent: 0pt;"&gt;&amp;#160;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&lt;font style="font-size: 10pt; font-family: times new roman; display: inline;"&gt;As of June 30, 2010, a total of 859,376 Class A and 500,000 Class B Warrants of the Company have been exercised&amp;#160;for respective equivalent number of&amp;#160;shares of common stock.&amp;#160;The exercise prices of&amp;#160;Class A and Class B Warrants are $2.50 and $3.00 per share, respectively.&amp;#160; In addition, the warrants to placement agent to purchase 542,394 shares of common stock at $1.60, 15,025 shares of common stock at $2.50 and the options issued to external service providers to purchase 165,000 shares of common stock at $2.00 per share have also been exercised. As a result, an aggregate of 2,081,795 shares of outstanding common stock have been&amp;#160;added and a total of $4,591,958 net proceeds have been received&amp;#160;from the exercise of these warrants and options.&lt;/font&gt;&lt;/div&gt;
&lt;div style="display: block; text-indent: 0pt;"&gt;&amp;#160;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&lt;font style="font-size: 10pt; font-family: times new roman; display: inline;"&gt;On September 30, 2010, the Company recorded $54,857 as dividends to the investors of the Company&amp;#8217;s January 2008 financing, representing the quarterly dividend (10% per annum) in accordance with the terms of the Certificate of Designation of the Relative Rights and Preferences of the Series A Convertible Preferred Stock. This resolution was approved by the Company&amp;#8217;s Board and the Company decided to pay the dividends in cash to those investors.&lt;/font&gt;&lt;/div&gt;
&lt;div style="display: block; text-indent: 0pt;"&gt;&amp;#160;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&lt;font style="font-size: 10pt; font-family: times new roman; display: inline;"&gt;On December 31, 2010, the Company recorded $53,501 as dividends to the investors of the Company&amp;#8217;s January 2008 financing, representing the quarterly dividend (10% per annum) in accordance with the terms of the Certificate of Designation of the Relative Rights and Preferences of the Series A Convertible Preferred Stock. This resolution was approved by the Company&amp;#8217;s Board and the Company decided to pay the dividends in cash to those investors.&lt;/font&gt;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&lt;font style="font-size: 10pt; font-family: times new roman; display: inline;"&gt;&amp;#160;&lt;/font&gt;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&lt;font style="font-size: 10pt; font-family: times new roman; display: inline;"&gt;By March 18, 2011, under the mandatory conversion agreement, the remaining 1,360,000 preferred shares were converted to common shares at 1:1 exchange ratio.&lt;/font&gt;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&amp;#160;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&lt;font style="font-size: 10pt; font-family: times new roman; display: inline;"&gt;On March 31, 2011, the Company recorded $34,661 as dividends to the investors of the Company&amp;#8217;s January 2008 financing, representing the quarterly dividend (10% per annum) in accordance with the terms of the Certificate of Designation of the Relative Rights and Preferences of the Series A Convertible Preferred Stock. This resolution was approved by the Company&amp;#8217;s Board and the Company decided to pay the dividends in cash to those investors.&lt;/font&gt;&lt;/div&gt;
&lt;div style="display: block; text-indent: 0pt;"&gt;&amp;#160;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&lt;font style="font-size: 10pt; font-family: times new roman; display: inline;"&gt;In November 2011, the Company repurchased 29,700 shares of common stock for $24,338, which was presented as treasury stock on balance sheet.&lt;/font&gt;&lt;/div&gt;
&lt;div style="display: block; text-indent: 0pt;"&gt;&amp;#160;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&lt;font style="font-size: 10pt; font-family: times new roman; display: inline;"&gt;As of June 30, 2013, there were 29,382,791 common shares outstanding with -0- outstanding preferred shares.&lt;/font&gt;&lt;/div&gt;
&lt;div align="justify" style="margin-left: 27pt; display: block; margin-right: 0pt; text-indent: 0pt;"&gt;&amp;#160;&lt;/div&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 shareholders' equity comprised of portions attributable to the parent entity and noncontrolling interest, including other comprehensive income. Includes, but is not limited to, balances of common stock, preferred stock, additional paid-in capital, other capital and retained earnings, accumulated balance for each classification of other comprehensive income and amount of comprehensive income.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 210

 -SubTopic 10

 -Section S99

 -Paragraph 1

 -Subparagraph (SX 210.5-02.29-31)

 -URI http://asc.fasb.org/extlink&amp;oid=6877327&amp;loc=d3e13212-122682



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 505

 -SubTopic 10

 -Section 50

 -Paragraph 6

 -URI http://asc.fasb.org/extlink&amp;oid=6928386&amp;loc=d3e21506-112644



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

 -Publisher SEC

 -Name Regulation S-X (SX)

 -Number 210

 -Section 02

 -Paragraph 29, 30, 31

 -Article 5



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 310

 -SubTopic 10

 -Section S99

 -Paragraph 2

 -Subparagraph (SAB TOPIC 4.E)

 -URI http://asc.fasb.org/extlink&amp;oid=27010918&amp;loc=d3e74512-122707



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 505

 -SubTopic 10

 -Section S99

 -Paragraph 4

 -Subparagraph (SAB TOPIC 4.C)

 -URI http://asc.fasb.org/extlink&amp;oid=27012166&amp;loc=d3e187143-122770



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

 -Publisher SEC

 -Name Regulation S-X (SX)

 -Number 210

 -Section 08

 -Article 4



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

 -Publisher SEC

 -Name Staff Accounting Bulletin (SAB)

 -Number Topic 4

 -Section C



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

 -Publisher SEC

 -Name Staff Accounting Bulletin (SAB)

 -Number Topic 4

 -Section E



Reference 9: 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.(d),(e))

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



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Glossary Preferred Stock

 -URI http://asc.fasb.org/extlink&amp;oid=6521494



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

 -Publisher SEC

 -Name Regulation S-X (SX)

 -Number 210

 -Section 04

 -Article 3



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 505

 -SubTopic 10

 -Section 50

 -Paragraph 2

 -URI http://asc.fasb.org/extlink&amp;oid=6928386&amp;loc=d3e21463-112644



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 505

 -SubTopic 10

 -Section S99

 -Paragraph 1

 -Subparagraph (SX 210.3-04)

 -URI http://asc.fasb.org/extlink&amp;oid=27012166&amp;loc=d3e187085-122770



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 505

 -SubTopic 10

 -Section 50

 -Paragraph 3

 -URI http://asc.fasb.org/extlink&amp;oid=6928386&amp;loc=d3e21475-112644



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 505

 -SubTopic 10

 -Section 50

 -Paragraph 11

 -URI http://asc.fasb.org/extlink&amp;oid=6928386&amp;loc=d3e21564-112644



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 505

 -SubTopic 10

 -Section 50

 -Paragraph 5

 -URI http://asc.fasb.org/extlink&amp;oid=6928386&amp;loc=d3e21488-112644



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 505

 -SubTopic 10

 -Section 50

 -Paragraph 4

 -URI http://asc.fasb.org/extlink&amp;oid=6928386&amp;loc=d3e21484-112644



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

 -Publisher SEC

 -Name Regulation S-X (SX)

 -Number 210

 -Section 08

 -Paragraph d

 -Article 4



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

 -Publisher FASB

 -Name Accounting Standards Codification

 -Topic 505

 -SubTopic 30

 -Section 50

 -Paragraph 2

 -URI http://asc.fasb.org/extlink&amp;oid=6405834&amp;loc=d3e23285-112656



</ElementReferences><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>STOCKHOLDERS' EQUITY AND RELATED FINANCING AGREEMENTS</Label></Row></Rows><Footnotes /><IsEquityReport>false</IsEquityReport><ReportName>Stockholders' Equity and Related Financing Agreements</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://www.tianyinpharma.com/role/StockholdersEquityAndRelatedFinancingAgreements</RoleURI><NumberOfCols>1</NumberOfCols><NumberOfRows>2</NumberOfRows></InstanceReport>
