Both come from East Africa's rift valley both are cichlids, both inhabit the same hard alkaline water so why shouldn't they be kept together?
The two lake are actually very different in many ways. Despite popular opinion the water of Lake Malawi isn't really all that hard.
The water found in Lake Tanganyika on the other hand is very different.
The water of Lake Tanganyika is extremely mineral rich and the fish found there of which a large proportion are endemic need to be kept in similar water if they are to thrive in captivity. The use of mineral supplements and trace elements is highly recommended for these fish.
Julidochromis regani from Lake Tanganyika
Lake Malawi has two basic types of cichlid, Mbuna and Haps. The mbuna are small (usually up to around 6") and live their lives in the same small location among the rocks and stones. They do not venture out in to open water. The haps on the other hand are fish of the open water and tend to keep well way from the more aggressive mbuna.
Most haps and mbuna are mouth brooders. This means that they don't need to defend a large territory on order to raise a family. So only small temporary breeding sites are claimed where the fish can spawn.
Mbuna tend to be very aggressive and even the most peaceful of them cannot be maintained as a pair in their own tank. Mbuna need to be kept in a fairly crowded situation and this makes them overcome their natural aggression because there is to much competition for a single male to take on. If they are kept to crowded it will result in stress and the fish won't thrive, if there are to few fish it will result in aggression as a dominant male will try to rule the tank. Somewhere in between is the magic number where there is little or no aggression and the fish thrive. As a rough guide the stocking level should be around 1.5" of fish per gall instead of the usual 1" of fish per gall. This relatively high stocking used to control aggression only works with mbuna. It does not work with haps or any other fish.
The fish of Lake Tanganyika on the whole tend not to be mouth brooders although a few are. Most require a permanent territory which they will defend in order to make it safe for them to raise a family there.
In order to control aggression with Tanganyikan fish try making different niches with in the tank. A rocky area, an open area of floor with a group of shells, open water and even a planted area to represent the vallis beds. Then stock the tank with a few fish from each of the different niches so that there is less competition for the same area in the tank. Crowding these fish will simply lead to stressed fish and possibly more aggression.
With the fish coming from different water chemistries and requiring very different maintenance and care it generally isn't a good idea to mix the two in the same aquarium.
Mbuna - are generally very colourful and some even rival marine fish. Their behaviour is pretty much the same throughout so there isn't much variation. On the whole they have a preference for vegetable based food but they still require a varied diet to be at their best. They need an aquarium set up with lots of rockwork. They breed freely and if there are enough nooks and crannies some fry will grow to adulthood even in a well stocked mbuna tank. One disadvantage with allowing mbuna to breed so freely is that they will hybridise very easily. To avoid this try keeping all the different species in groups of one male to three or four females and keep fish which are very different in appearance from each other. It won't solve the problem completely but it will reduce it.
Haps - Usually a little larger and more varied in colour. require an open tank with little rockwork or plants but with a sandy substrate. These fish too will breed quite freely and unless several of the same genus are kept together there is less likelihood of them hybridising.
Tanganyikan fish are mostly less colourful than Malawi fish but are more diverse. Although they are all cichlids they have become very specialised in order to fill different niches and this makes them far more interesting to keep. They should not be heavily stocked but stocked with fish from different niches in order to lessen competition and therefore aggression.