Usually, a "damage roll" is considered as "all the dice rolls and damage bonuses that the attack describes". In a simple case, you'd simply do the 1 + 3d4 first and then add the proficiency bonus that corresponds to your level. At first level, that's (1 + 3d4) + 2 .
However, in case of resistances, things get a little complicated. If the target is resistant to poison but not to piercing, how much damage does it take?
The PHB doesn't say anything on the topic. The only similar thing I've found is for things like "3d4 piercing and poison damage", in which case the target would have to have resistances for both effects for it to apply. Extending that logic, one could argue that you apply resistances for each damage type individually. But where does the proficiency bonus come into effect then?
I would say the issue is ambiguous enough that the final decision should fall with the DM and be maintained as a house rule. I would suggest the following rule based on my own reasoning:
The Ranger's proficiency bonus applies to the skill-based aspect of the beast's attack.
Effect: For this example, the snake's ability to bite is enhanced by the Ranger's ability to command it, therefore the piercing potion (the bite) is enhanced by the proficiency bonus while the poison damage (the snake's venom) is dealt as-is. For someone resistant to poison it means the target would take half of the 3d4 poison damage, but the full (1+proficiency) piercing damage.
Rationale: The Ranger's understanding of its snake companion and his ability to train and command it has made the companion more skillful with its attacks. However, the snake's body still produces the same venom as it would if the snake was just a wild animal. Therefore the bonus to the snake's damage should apply to the physical portion unless stated otherwise.
To further illustrate the point, let's consider a Fighter with a flaming sword that deals 2d6 slashing + 1d8 fire damage. When attacking he adds his Strength modifier to the damage. The Fighter's ability to wield a sword is what causes the Strength bonus, so the extra damage would naturally be applied to the slashing part. If a target is resistant to fire, it only resists the 1d8. The snake is similar, with its fangs as its weapon, the poison as the extra effect, and the Ranger's proficiency bonus as the added skill damage.
Counter-rationale:
One could argue that a beast with a purely non-physical attack (e.g. breathing fire or spitting poison) should not receive the bonus. I would suggest that perhaps the Ranger trained the beast into using its natural resource more skillfully (e.g. aiming for the eyes) and that's why the bonus applies (as the original RAW rule intended).
One could also argue that if a damage roll has two types of physical attack that the bonus should apply to both. That would conflict with the RAW rule of "apply the bonus once per damage roll". I would probably assign the bonus to the first type. I haven't ever even heard of such an attack, though, and having a beast with such an attack AND an enemy with a resistance to one of the two is a situation that I'm sure will not arise often.
Multiple attacks:
As the RAW rule intended, this effect is applied once per the beast's attack. That means that, although the snake's attack contains two damage types, it is still a single attack and gains the proficiency bonus once. If a beast can make multiple attacks as its action, though, it gains the bonus once per each attack, but it has to make an attack roll for each attack as well.
Alternative house rule
If the damage roll consists of multiple damage types and the target resists only one of them, apply the proficiency bonus to the non-resisted part of the damage. Only when the target resists all of the damage types that are part of the attack is the proficiency bonus included in the reduced damage calculation.
So, going back to the Flying Snake example, if the target resists poison, it's the same as the former rule: (1+proficiency) + (3d4)/2, rounded down.
If the target resists piercing instead, the proficiency bonus is now applied to the poison damage: 1/2 + (3d4 + proficiency). Because we round down, that means the piercing part is essentially nullified (which you could role-play as the bite was never felt, turning a resistance into a stealthy advantage).
Only if the target has both piercing and poison resistance is the attack fully resisted, and we go back to the standard ((1 + 3d4) + proficiency)/2, rounded down.
I like the first rule better for role-playing purposes, but this one is quick to resolve and doesn't require any consideration as to what a "skill-based aspect" of the attack is.
I wanted to leave THIS here for reference and to let everyone reading know that NOTHING about the Revised Ranger Unearthed Arcana has been tuned or explained as it applies to Multi-Classing yet, as stated by Crawford. A single dip into this current ranger build allows considerably powerful combinations, such as permanent sneak attack.
That being said, and knowing that we have no SPECIFIC rulings yet on how to Multiclass this 'still in testing phase' Ranger, what follows are the rules for Multiclassing and how they apply to ALL Class Features. Of this there can be no argument until we hear details on how to Multiclass the Enclave Ranger.
Class Features only apply when levels in that Class are gained.
First; both of these Features are exactly that. Ranger Features; and as such the extra Hit Die and the ASI to your ranger companion do NOT work if you gain levels in other classes. Read this as 'For every Ranger level after 3rd'.
Example: Rogue Expertise
"...at 6th level you can choose two more of your proficiencies to gain this benefit..."
When you are a rogue you gain Expertise at 1st level. You don't then get to choose a second set of skills to gain expertise in at 6th level, unless you have 6 levels in Rogue. Even though it does not say as much explicitly, it is implied that this is a Rogue Feature, and applies only to Rogue levels.
The Feature you are asking about is Companion's Bond, and appears on Pages 5-6 of the Revised Ranger Document found in the Unearthed Arcana section of the D&D website. Since this is a class feature unique to the Ranger class Beastmaster Enclave, its rules only apply when you gain levels in Ranger.
Second; Ability Score Improvements (ABIs) are also class specific Features. So if you gain your ASI from the Ranger Ability Score Improvement Feature at the Ranger levels shown, your Ranger beast companion benefits from it as well. What this does not mean is that if you gain levels in, say, Fighter; which has more ASI granted to you; that it applies to your Companions Bond Ranger feature. Think of this as, if you are learning the art of the Fighter on the side, any experience you gain as a Fighter is in exchange for growing better as a Ranger and working better with your Animal Companion. Your Animal Companion is only ever linked to Ranger.
Same goes for any Features found in the Ranger list. Only Ranger levels. This can be backed up more solidly by looking at PHB pg. 163 - 164. The Multi-classing table has a definitive and exhaustive list of things that are gained when multiclassing, and points out that anything not listed there, or explicitly tied to Character Level elsewhere (such as Proficiency Bonus), is never tied to Character Level.
This makes a few solid points
- You gain Hit Dice and Hit Points only from your Class Level.
- Proficiency Bonus is based on Character Level.
- Only when you gain a level in a particular class, do you gain features from ONLY that particular class; both from any features given to you at that class level, and features that grow more powerful as you gain levels in that class.
The only exception to this rule, because 'specific beats general' is when it comes to your Animal Companion's proficiency bonus, as stated in the separate box on page 6. It says as you gain levels and your proficiency bonus goes up, so too does your animal companions proficiency bonus. It will always match your own proficiency bonus no matter what Multiclass levels you might have.
Best Answer
The Ape is proficient with both of those skills. From the D&D5e SRD:
That same document has a Proficiency Bonus by Challenge Rating table that says that a CR 1/2 creature, like the Ape, has a proficiency bonus of +2. We can then take the stat bonuses from the 16 Str (+3) and 12 Wis (+1) to get the Ape's total modifiers to those skills.
So to determine what the Ape Companion's actual modifiers are for those skills you would take the stat bonus (+3 and +1) and add the ranger's proficiency bonus. You would do the same thing for the other skills you choose for it to learn.