Finite math and business calculus in portfolio management

Your portfolio manager has suggested two high yielding stocks: The Altria group (MO) and Reynolds America (RAI)  MO shares cost $50, yield 4.5% in dividends and have risk index of 2.0 per share. RAI shares cost $55, yield 5% in dividends, and have a risk index of 3.0 per share. you have up to $9,050 to invest and would like to earn at least $410 in dividends. How many shares of each stock should you purchase to meet your requirements and minimize the total risk index for your portfolio?