How can I use one AppleID for Contacts, Calendar etc, but an other for purchases? BACKGROUND
Many years ago when I first got an iPod I created an AppleID, which my wife and I shared for AppStore purchases.

When Apple changed the system, we created new AppleID to use for iCloud synchronisation for Contacts etc.
We continued to use the original AppleID for purchases, which were all done through iTunes.

Now that iTunes no longer works for purchases I have been updating apps on line.

I wanted to install a new (free) app on my iPhone. This prompted for the password for my new AppleID, which I entered.
I now seem to have one app on my new AppleID, and all the others on the original AppleID.


  How can I configure my devices to use the new AppleID for Contacts, Calendar etc, but use the original AppleID for purchases?


Logging off the new then logging on the new seems to take forever, and wants to overwrite all my data.

PS The original AppleID has Family Sharing setup.

The iPhone is running iOS 10.3.2

When I go to Settings this shows  

iCloud: new AppleID
Store: original AppleID


below this it shows  

iCloud: new AppleID
iTunes &amp; App Store: original AppleID
Family Sharing: my name &amp; my wife's name


I see no "person" icon on the top right, and when I click on Updates this prompts me for the password for my new AppleID

"Purchases" in the App Store shows

My Purchases

Family Purchases
my wife's name
my name


The apps in My Purchases and Family Purchases my name seem the same!
On the iPhone, open the App Store. Click the "person" icon on the top right. This will allow you to log out from your new Apple ID, and then login with your old Apple ID.

This will not overwrite any date, nor will it change which Apple ID is used for contacts, calendar, iCloud or anything like that. It will only change which Apple ID is used for purchases on the App Store (including downloading of free apps).