The Supreme Court agreed yesterday to review two state laws that impose taxes on dividends, capital gains and other income of independent foreign subsidiaries whose parent companies reside in those states.

F.W. Woolworth Co. and Asarco Inc., formerly the American Smelting and Refining Co., challenged the constitutionality of the taxing systems of New Mexico and Idaho, respectively, in cases that could have an impact on the taxation of multistate and multinational firms operating across the country.

Woolworth and Asarco contend income earned in out-of-state businesses operating independently of the parent company should not be included as taxable business income by the states in which the parent company resides.

The two multinational firms said they are seeking clarification of a previous ruling involving Mobil Oil Corp. In that ruling, the Supreme Court said for Mobil to exclude its dividend income from state taxes it had to prove the income was earned in activities unrelated to Mobil's petroleum products business, or whatever business it conducted in that state.

Income from the out-of-state subsidiary can be taxed by a state if it reflects profits from a "functionally integrated enterprise," the court said.

Asarco and Woolworth present a slightly different issue. They contend their subsidiaries are functionally independent from the business they conduct in Idaho and New Mexico.

Woolworth said because its dividend and interest income earned from foreign subsidiaries was taxed by New Mexico, its taxable income for 1977 in that state rose from $84,622 to $401,518. Asarco said its Idaho taxable income was likewise increased from $419,876 to $2.27 million in 1969 and from $127,775 to $2.16 million in 1970.

Another case the court agreed to hear this term challenges the constitutionality of construction industry labor contracts that exclude from on-site subcontracting work anyone who doesn't already have a labor agreement with the union local.

State contractor associations in Oregon and Washington and a California firm challenged the rule claiming it forces all employes of subcontractors to join the local and prohibits contractors from dealing with any subcontractor that uses nonunion members or members of other local unions.

The National Labor Relations Board said although the rule amounts to a secondary boycott, it is lawful because a section of the Labor Management Relations Act prohibiting such boycotts excludes agreements between a labor organization and an employer in an effort to reduce friction between union and nonunion employes.

An appeals court panel agreed with the NLRB. If the appeals court decision is allowed to stand, "then all subcontractors' employes are fair game for top-down organizing," the Oregon-Washington group said. "Unions can exclude all nonunion subcontractors from the market by simply requiring such a subcontractor clause in their labor contracts with general contractors."

In other actions, the court:

* Declined to review a case brought by Maryland Comptroller Louis L. Goldstein challenging the Treasury Department's right to regulate the sizes of bottles for alcoholic beverages.

* Agreed to hear a case challenging a United Mine Workers pension rule prohibiting certain pension benefits to survivors of workers who had stayed on the job past retirement age.

* Agreed to hear a petition of 15 Teamsters local members who were fired by a new local president for supporting the unsuccessful candidate.

* Declined to hear a case to determine whether a labor organization is liable under the Labor Management Relations Act for alleged violations of law by its members.

* Declined to hear a case questioning whether a firm can end pension payments to retirees when its collective bargaining agreement has ended.