In my opinion your legs and feet should not be touching the bike at all. If they are it means your position is wrong.
The photograph you posted shows your feet are not straight on the pedals as the heel is turned in towards the bike. It also appears your knees are turned inward.
I would suggest you should concentrate on straightening both. I do mean concentrate, your body and mind will both be used to this as your natural position. It will take months to teach yourself to automatically use a new position. It's something you need to think about and check throughout your ride.
You mentioned having one leg longer than the other. You also mentioned pain in your hip. Your photograph suggests you pronate on the bike which may be why your legs appear to be leaning inward. I have one leg longer than the other, a tendency to pull to the right when cycling, hip pain and I pronate.
Do you wear a heel raiser and/or inserts during day to day life? If not I feel you should consider seeing a podiatrist about this, you may be given a heel raiser and shoe inserts. Try to find one with a good knowledge of bio-mechanics.
All the issues I had were solved in a week after seeing a podiatrist and starting to use both.
With uneven leg length your saddle height will be wrong for one leg and probably both. It will be a compromise attempting to make both legs comfortable. After I began to wear a heel raiser I had to increase my saddle height by 1.5cm. Doing so improved my overall position and riding but more importantly corrected the tendency for me to put to much pressure on the right down stroke which used to cause me to veer to the right.