State tax filing

Thanks, but still confusing. For example Michigan defines business income as "all income arising from transactions, activities, and sources...". The "transaction" occurred in another state (where both I and the corporate entity that paid me are located), the "source" was in that other state, and I don't know how to define the "activity" - was it the teaching I did, or the financial transaction that occurred? At least two of the three occurred outside of the state of Michigan. Any further insight?